From ef078f7778b2cce9eb86dcbabc0fc782795886e5 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Mon, 23 Oct 2017 17:41:17 +0200 Subject: verify: Fix handling os.open() exceptions in Python 2 --- gemato/verify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gemato/verify.py b/gemato/verify.py index 397488b..888af57 100644 --- a/gemato/verify.py +++ b/gemato/verify.py @@ -39,7 +39,7 @@ def verify_path(path, e): try: # we want O_NONBLOCK to avoid blocking when opening pipes fd = os.open(path, os.O_RDONLY|os.O_NONBLOCK) - except IOError as err: + except OSError as err: if err.errno == errno.ENOENT: exists = False opened = False -- cgit v1.2.3