[Sugar-devel] [PATCH sugar] Fix pylint regression

Simon Schampijer simon at schampijer.de
Tue Jul 5 05:40:34 EDT 2011


On 07/05/2011 11:37 AM, Simon Schampijer wrote:
> On 07/05/2011 09:56 AM, Simon Schampijer wrote:
>> ---
>> src/jarabe/model/shell.py | 9 +++++----
>> 1 files changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/jarabe/model/shell.py b/src/jarabe/model/shell.py
>> index a17c593..87546d8 100644
>> --- a/src/jarabe/model/shell.py
>> +++ b/src/jarabe/model/shell.py
>> @@ -543,20 +543,20 @@ class ShellModel(gobject.GObject):
>> window.maximize()
>>
>> if not home_activity:
>> - logging.debug('first window registered for %s' % activity_id)
>> + logging.debug('first window registered for %s', activity_id)
>> color = self._shared_activities.get(activity_id, None)
>> home_activity = Activity(activity_info, activity_id,
>> color, window)
>> self._add_activity(home_activity)
>> else:
>> - logging.debug('window registered for %s' % activity_id)
>> + logging.debug('window registered for %s', activity_id)
>> home_activity.add_window(window)
>>
>> if wm.get_sugar_window_type(window) != 'launcher' \
>> and home_activity.get_launch_status() == Activity.LAUNCHING:
>> self.emit('launch-completed', home_activity)
>> startup_time = time.time() - home_activity.get_launch_time()
>> - logging.debug('%s launched in %f seconds.' %
>> + logging.debug('%s launched in %f seconds.',
>> (activity_id, startup_time))
>>
>> if self._active_activity is None:
>> @@ -569,7 +569,8 @@ class ShellModel(gobject.GObject):
>> if activity is not None:
>> activity.remove_window_by_xid(xid)
>> if activity.get_window() is None:
>> - logging.debug('last window gone - remove activity %s' % activity)
>> + logging.debug('last window gone - remove activity ',
>> + activity)
>> self._remove_activity(activity)
>>
>> def _get_activity_by_xid(self, xid):
>
> Of course this must be:
>
> diff --git a/src/jarabe/model/shell.py b/src/jarabe/model/shell.py
> index 87546d8..d5d641d 100644
> --- a/src/jarabe/model/shell.py
> +++ b/src/jarabe/model/shell.py
> @@ -569,7 +569,7 @@ class ShellModel(gobject.GObject):
> if activity is not None:
> activity.remove_window_by_xid(xid)
> if activity.get_window() is None:
> - logging.debug('last window gone - remove activity ',
> + logging.debug('last window gone - remove activity %s',
> activity)
> self._remove_activity(activity)
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>

Sorry for the Spam :/

diff --git a/src/jarabe/model/shell.py b/src/jarabe/model/shell.py
index 87546d8..31605f7 100644
--- a/src/jarabe/model/shell.py
+++ b/src/jarabe/model/shell.py
@@ -557,7 +557,7 @@ class ShellModel(gobject.GObject):
                  self.emit('launch-completed', home_activity)
                  startup_time = time.time() - 
home_activity.get_launch_time()
                  logging.debug('%s launched in %f seconds.',
-                    (activity_id, startup_time))
+                              activity_id, startup_time)

              if self._active_activity is None:
                  self._set_active_activity(home_activity)
@@ -569,7 +569,7 @@ class ShellModel(gobject.GObject):
              if activity is not None:
                  activity.remove_window_by_xid(xid)
                  if activity.get_window() is None:
-                    logging.debug('last window gone - remove activity ',
+                    logging.debug('last window gone - remove activity %s',
                                    activity)
                      self._remove_activity(activity)


More information about the Sugar-devel mailing list