From 313303aa93371463fcc184d637d7637183418833 Mon Sep 17 00:00:00 2001 From: Sascha Silbe Date: Wed, 19 Aug 2009 17:37:40 +0000 Subject: let the logger do the formatting --- (limited to 'extensions') diff --git a/extensions/cpsection/aboutcomputer/model.py b/extensions/cpsection/aboutcomputer/model.py index 6cddb4c..898d79c 100644 --- a/extensions/cpsection/aboutcomputer/model.py +++ b/extensions/cpsection/aboutcomputer/model.py @@ -111,7 +111,7 @@ def _read_file(path): value = value.strip('\n') return value else: - _logger.debug('No information in file or directory: %s' % path) + _logger.debug('No information in file or directory: %s', path) return None def get_license(): diff --git a/extensions/cpsection/updater/backends/aslo.py b/extensions/cpsection/updater/backends/aslo.py index 8c01ec2..443fd1c 100644 --- a/extensions/cpsection/updater/backends/aslo.py +++ b/extensions/cpsection/updater/backends/aslo.py @@ -116,8 +116,7 @@ class _UpdateFetcher(object): if document.find(_FIND_DESCRIPTION) is None: logging.debug('Bundle %s not available in the server for the ' - 'version %s' % (self._bundle.get_bundle_id(), - config.version)) + 'version %s', self._bundle.get_bundle_id(), config.version) version = None link = None size = None diff --git a/extensions/cpsection/updater/model.py b/extensions/cpsection/updater/model.py index 489cfa5..102edea 100755 --- a/extensions/cpsection/updater/model.py +++ b/extensions/cpsection/updater/model.py @@ -119,7 +119,7 @@ class UpdateModel(gobject.GObject): self._downloader.connect('error', self.__downloader_error_cb) def __downloader_progress_cb(self, downloader, progress): - logging.debug('__downloader_progress_cb %r' % progress) + logging.debug('__downloader_progress_cb %r', progress) total = self._total_bundles_to_update * 2 current = total - len(self._bundles_to_update) * 2 - 2 + progress @@ -133,7 +133,7 @@ class UpdateModel(gobject.GObject): self._downloader = None def __downloader_error_cb(self, downloader, error_message): - logging.error('Error downloading update:\n%s' % error_message) + logging.error('Error downloading update:\n%s', error_message) total = self._total_bundles_to_update * 2 current = total - len(self._bundles_to_update) * 2 diff --git a/extensions/deviceicon/battery.py b/extensions/deviceicon/battery.py index 76b1565..edfcce4 100644 --- a/extensions/deviceicon/battery.py +++ b/extensions/deviceicon/battery.py @@ -189,28 +189,28 @@ class DeviceModel(gobject.GObject): try: return self._battery.GetProperty(_LEVEL_PROP) except dbus.DBusException: - logging.error('Cannot access %s' % _LEVEL_PROP) + logging.error('Cannot access %s', _LEVEL_PROP) return 0 def _get_charging(self): try: return self._battery.GetProperty(_CHARGING_PROP) except dbus.DBusException: - logging.error('Cannot access %s' % _CHARGING_PROP) + logging.error('Cannot access %s', _CHARGING_PROP) return False def _get_discharging(self): try: return self._battery.GetProperty(_DISCHARGING_PROP) except dbus.DBusException: - logging.error('Cannot access %s' % _DISCHARGING_PROP) + logging.error('Cannot access %s', _DISCHARGING_PROP) return False def _get_present(self): try: return self._battery.GetProperty(_PRESENT_PROP) except dbus.DBusException: - logging.error('Cannot access %s' % _PRESENT_PROP) + logging.error('Cannot access %s', _PRESENT_PROP) return False def do_get_property(self, pspec): diff --git a/extensions/deviceicon/volume.py b/extensions/deviceicon/volume.py index 5c4c49e..4ccae7a 100644 --- a/extensions/deviceicon/volume.py +++ b/extensions/deviceicon/volume.py @@ -97,7 +97,7 @@ def _mount(volume, tray): volume.mount(gtk.MountOperation(tray.get_toplevel()), _mount_cb) def _mount_cb(volume, result): - logging.debug('_mount_cb %r %r' % (volume, result)) + logging.debug('_mount_cb %r %r', volume, result) volume.mount_finish(result) def _mount_added_cb(volume_monitor, mount, tray): -- cgit v0.9.1