X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/996389725d454494a8e0046f6b7b4f03d9407463..c52181f8ccd2d9a9d50fbe31bbab0e34b16a362e:/catalogue/management/commands/importlessons.py diff --git a/catalogue/management/commands/importlessons.py b/catalogue/management/commands/importlessons.py index 1d65d18..1eefc46 100755 --- a/catalogue/management/commands/importlessons.py +++ b/catalogue/management/commands/importlessons.py @@ -77,7 +77,7 @@ class Command(BaseCommand): self.import_book(file_path, options) files_imported += 1 transaction.commit() - except Section.IncompleteError: + except Section.IncompleteError, e: if file_name not in postponed or postponed[file_name] < files_imported: # Push it back into the queue, maybe the missing lessons will show up. if verbose > 0: @@ -88,7 +88,8 @@ class Command(BaseCommand): # We're in a loop, nothing's being imported - some lesson is really missing. raise e except BaseException, e: - print e + import traceback + traceback.print_exc() files_skipped += 1 # Print results