[kupfer: 19/31] launch: Handle when get_application() returns None
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer: 19/31] launch: Handle when get_application() returns None
- Date: Thu, 31 Dec 2009 12:56:03 +0000 (UTC)
commit 816ee5e99e8dd6e34f9ba9865f3d6436e21ee21f
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Wed Dec 30 20:18:01 2009 +0100
launch: Handle when get_application() returns None
kupfer/launch.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/launch.py b/kupfer/launch.py
index a88bbdd..167a90e 100644
--- a/kupfer/launch.py
+++ b/kupfer/launch.py
@@ -221,7 +221,7 @@ class ApplicationsMatcherService (pretty.OutputMixin):
def application_is_running(self, app_id):
for w in self._get_wnck_screen_windows_stacked():
app = w.get_application()
- if self._is_match(app_id, app):
+ if app and self._is_match(app_id, app):
return True
return False
@@ -229,7 +229,7 @@ class ApplicationsMatcherService (pretty.OutputMixin):
application_windows = []
for w in self._get_wnck_screen_windows_stacked():
app = w.get_application()
- if self._is_match(app_id, app):
+ if app and self._is_match(app_id, app):
application_windows.append(w)
if not application_windows:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]