]> git.parisson.com Git - teleforma.git/commitdiff
fix formats
authoryomguy <yomguy@parisson.com>
Tue, 17 Jul 2012 21:48:09 +0000 (23:48 +0200)
committeryomguy <yomguy@parisson.com>
Tue, 17 Jul 2012 21:48:09 +0000 (23:48 +0200)
teleforma/management/commands/teleforma-import-conferences.py

index 31a9e74fa0734ea02f2498fa53ac3cb1a7118a4f..e3f79fb5f4419ab5335de35068d229969a96ce47 100644 (file)
@@ -28,7 +28,7 @@ class Command(BaseCommand):
     args = 'organization'
     spacer = '_-_'
     formats = ['mp3', 'webm']
-    logger = Logger('/var/log/telecaster/import.log')
+    logger = Logger('/tmp/import.log')
 
     def handle(self, *args, **options):
         organization_name = args[0]
@@ -39,10 +39,11 @@ class Command(BaseCommand):
 
         for root, dirs, files in os.walk(self.media_dir):
             for filename in files:
+                print filename
                 name = os.path.splitext(filename)[0]
                 ext = os.path.splitext(filename)[1]
 
-                if ext in formats:
+                if ext in self.formats:
                     path = root + os.sep + filename
                     root_list = root.split(os.sep)
                     public_id = root_list[-1]