Changeset 95ce89e4 for tools/scripts/telemeta-crem-import.py
- Timestamp:
- 10/24/11 15:14:25 (19 months ago)
- Branches:
- master, crem, crem2, dev, dev2, diadems, forma, generic, instru_search, lam, nlivemulti, production, release/1.4.4, security, social, storage, test, video
- Children:
- d4c2dd3, 785d13a
- Parents:
- 86d17e9
- git-author:
- yomguy <yomguy@…> (10/24/11 15:14:25)
- git-committer:
- yomguy <yomguy@…> (10/24/11 15:14:25)
- File:
-
- 1 edited
-
tools/scripts/telemeta-crem-import.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tools/scripts/telemeta-crem-import.py
r7dd4aa8 r95ce89e4 72 72 print item.old_code + ' : id = ' + str(item.id) + " : title = " + item.title 73 73 if os.path.exists(wav_file): 74 f = open(wav_file, 'r') 75 file_content = ContentFile(f.read()) 76 item.file.save(filename, file_content) 77 f.close() 78 item.code = new_ref 79 item.save() 74 if not item.file : 75 f = open(wav_file, 'r') 76 file_content = ContentFile(f.read()) 77 item.file.save(filename, file_content) 78 f.close() 79 item.code = new_ref 80 item.save() 81 else: 82 msg = old_ref + ' : fichier ' + wav_file + ' déjà ajouté !' 83 print msg 84 self.logger.write_error(collection, msg) 80 85 else: 81 86 msg = old_ref + ' : fichier audio ' + wav_file + ' inexistant !'
Note: See TracChangeset
for help on using the changeset viewer.
