diff options
author | Bastien Nocera <hadess@hadess.net> | 2013-04-17 10:52:41 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2013-04-17 16:09:21 +0200 |
commit | 97383f1fdebfe32899893d5dada96d83645eab03 (patch) | |
tree | 15d0421344ec7dd1b9b791b5d4e6826bdd4f8002 | |
parent | d789d4451168025406c83671f7e66a2f47ca40af (diff) | |
download | gnome-settings-daemon-97383f1fdebfe32899893d5dada96d83645eab03.tar.gz |
power: Fix error handling path in wait loops
When checking the session or logind output, we shouldn't silently
succeed when there's an IOError.
This doesn't have an impact on reading the session log, but all
the check_for_suspend() tests fail, and check_no_suspend() will
obviously always succeed.
-rwxr-xr-x | plugins/power/test.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/power/test.py b/plugins/power/test.py index e719f07c..b766f7eb 100755 --- a/plugins/power/test.py +++ b/plugins/power/test.py @@ -197,7 +197,7 @@ class PowerPluginTest(gsdtestcase.GSDTestCase): try: log = self.session_log.read() except IOError: - break + continue if log and (b'GsmManager: requesting logout' in log): break @@ -227,7 +227,7 @@ class PowerPluginTest(gsdtestcase.GSDTestCase): try: log = self.logind.stdout.read() except IOError: - break + continue if log and (b' Suspend ' in log or b' Hibernate ' in log): break |