Do not fail if there is not an activity service
This commit is contained in:
parent
f022f98815
commit
c210b7720b
1
NEWS
1
NEWS
@ -1,3 +1,4 @@
|
|||||||
|
* Do not fail if there is not an activity service. (marco)
|
||||||
* Alert when an activity cannot be saved. (rwh)
|
* Alert when an activity cannot be saved. (rwh)
|
||||||
|
|
||||||
Snapshot 47e231311b
|
Snapshot 47e231311b
|
||||||
|
@ -171,9 +171,11 @@ class Shell(gobject.GObject):
|
|||||||
|
|
||||||
home_model = self._model.get_home()
|
home_model = self._model.get_home()
|
||||||
activity = home_model.get_active_activity()
|
activity = home_model.get_active_activity()
|
||||||
if activity:
|
if activity is not None:
|
||||||
|
service = activity.get_service()
|
||||||
|
if service is not None:
|
||||||
try:
|
try:
|
||||||
activity.get_service().TakeScreenshot(timeout=2.0)
|
service.TakeScreenshot(timeout=2.0)
|
||||||
except dbus.DBusException, e:
|
except dbus.DBusException, e:
|
||||||
logging.debug('Error raised by TakeScreenshot(): %s', e)
|
logging.debug('Error raised by TakeScreenshot(): %s', e)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user