From: yomguy Date: Tue, 17 Jul 2012 21:48:09 +0000 (+0200) Subject: fix formats X-Git-Tag: 0.7-dev^2~125 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=abb9c8465f7d0f766da907e8384dd4312523b9a5;p=teleforma.git fix formats --- diff --git a/teleforma/management/commands/teleforma-import-conferences.py b/teleforma/management/commands/teleforma-import-conferences.py index 31a9e74f..e3f79fb5 100644 --- a/teleforma/management/commands/teleforma-import-conferences.py +++ b/teleforma/management/commands/teleforma-import-conferences.py @@ -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]