Restore suspend catch the wrong exception
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
This commit is contained in:
parent
62b60fa1e1
commit
53a148f88c
@ -80,6 +80,6 @@ class PowerManager():
|
|||||||
path = os.path.join(_POWERD_INHIBIT_DIR, str(os.getpid()))
|
path = os.path.join(_POWERD_INHIBIT_DIR, str(os.getpid()))
|
||||||
try:
|
try:
|
||||||
os.unlink(path)
|
os.unlink(path)
|
||||||
except IOError:
|
except OSError:
|
||||||
logging.error("Inhibit Suspend: Could not delete file %s", path)
|
logging.error("Inhibit Suspend: Could not delete file %s", path)
|
||||||
self._suspend_inhibit_counter = 0
|
self._suspend_inhibit_counter = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user