diff options
author | Sascha Silbe <sascha@silbe.org> | 2009-08-19 17:37:40 (GMT) |
---|---|---|
committer | Sascha Silbe <sascha@silbe.org> | 2009-08-24 18:47:16 (GMT) |
commit | 313303aa93371463fcc184d637d7637183418833 (patch) | |
tree | beb6f282a9bbbb0037007a0d9095e35748a04e97 /src/jarabe/journal/misc.py | |
parent | c2620c745dc54cbf4d44846574f30652e812c2aa (diff) |
let the logger do the formatting
Diffstat (limited to 'src/jarabe/journal/misc.py')
-rw-r--r-- | src/jarabe/journal/misc.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/jarabe/journal/misc.py b/src/jarabe/journal/misc.py index 5a9feb0..e6e5abf 100644 --- a/src/jarabe/journal/misc.py +++ b/src/jarabe/journal/misc.py @@ -44,7 +44,7 @@ def _get_icon_for_mime(mime_type): return file_name icons = gio.content_type_get_icon(mime_type) - logging.debug('icons for this file: %r' % icons.props.names) + logging.debug('icons for this file: %r', icons.props.names) for icon_name in icons.props.names: file_name = get_icon_file_name(icon_name) if file_name is not None: @@ -96,27 +96,27 @@ def get_bundle(metadata): if is_activity_bundle(metadata): file_path = util.TempFilePath(model.get_file(metadata['uid'])) if not os.path.exists(file_path): - logging.warning('Invalid path: %r' % file_path) + logging.warning('Invalid path: %r', file_path) return None return ActivityBundle(file_path) elif is_content_bundle(metadata): file_path = util.TempFilePath(model.get_file(metadata['uid'])) if not os.path.exists(file_path): - logging.warning('Invalid path: %r' % file_path) + logging.warning('Invalid path: %r', file_path) return None return ContentBundle(file_path) elif is_journal_bundle(metadata): file_path = util.TempFilePath(model.get_file(metadata['uid'])) if not os.path.exists(file_path): - logging.warning('Invalid path: %r' % file_path) + logging.warning('Invalid path: %r', file_path) return None return JournalEntryBundle(file_path) else: return None except MalformedBundleException, e: - logging.warning('Incorrect bundle: %r' % e) + logging.warning('Incorrect bundle: %r', e) return None def _get_activities_for_mime(mime_type): @@ -196,7 +196,7 @@ def resume(metadata, bundle_id=None): if bundle_id is None: activities = get_activities(metadata) if not activities: - logging.warning('No activity can open this object, %s.' % + logging.warning('No activity can open this object, %s.', metadata.get('mime_type', None)) return bundle_id = activities[0].get_bundle_id() |