Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-11-13 15:20:34 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-11-13 15:20:34 (GMT)
commitc210b7720b46134a1d2539387fe3fcdf0b4082ab (patch)
treeaff8421296839cd24b00ca4e8bd76205f1b3cfa9 /shell
parentf022f98815da003e70e7b01b32fd4b54127d2d2b (diff)
Do not fail if there is not an activity service
Diffstat (limited to 'shell')
-rw-r--r--shell/view/Shell.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/shell/view/Shell.py b/shell/view/Shell.py
index f636230..05e058e 100644
--- a/shell/view/Shell.py
+++ b/shell/view/Shell.py
@@ -171,11 +171,13 @@ class Shell(gobject.GObject):
home_model = self._model.get_home()
activity = home_model.get_active_activity()
- if activity:
- try:
- activity.get_service().TakeScreenshot(timeout=2.0)
- except dbus.DBusException, e:
- logging.debug('Error raised by TakeScreenshot(): %s', e)
+ if activity is not None:
+ service = activity.get_service()
+ if service is not None:
+ try:
+ service.TakeScreenshot(timeout=2.0)
+ except dbus.DBusException, e:
+ logging.debug('Error raised by TakeScreenshot(): %s', e)
def set_zoom_level(self, level):
if level == self._zoom_level: