Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/carquinyol/migration.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/carquinyol/migration.py')
-rw-r--r--src/carquinyol/migration.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/carquinyol/migration.py b/src/carquinyol/migration.py
index ed82558..95ee391 100644
--- a/src/carquinyol/migration.py
+++ b/src/carquinyol/migration.py
@@ -43,14 +43,13 @@ def migrate_from_0():
if ext != '.metadata':
continue
- logging.debug('Migrating entry %r' % uid)
+ logging.debug('Migrating entry %r', uid)
try:
_migrate_metadata(root_path, old_root_path, uid)
_migrate_file(root_path, old_root_path, uid)
_migrate_preview(root_path, old_root_path, uid)
except Exception:
- logging.error('Error while migrating entry %r: %s\n' % \
- (uid, traceback.format_exc()))
+ logging.exception('Error while migrating entry %r', uid)
# Just be paranoid, it's cheap.
if old_root_path.endswith('datastore/store'):
@@ -86,9 +85,8 @@ def _migrate_metadata(root_path, old_root_path, uid):
finally:
f.close()
except Exception:
- logging.error(
- 'Error while migrating property %s of entry %s: %s\n' % \
- (key, uid, traceback.format_exc()))
+ logging.exception(
+ 'Error while migrating property %s of entry %s', key, uid)
def _migrate_file(root_path, old_root_path, uid):