+ except OSError as e: + if e.errno == 5: + pass
This check makes little sense -- if errno is 5 or something else, the exception is ignored in both cases. So just
except OSError: pass
is sufficient IMHO -- after all, what else can you do, you can't even print a warning :-)
+ except OSError as e:
+ if e.errno == 5:
+ pass
This check makes little sense -- if errno is 5 or something else, the exception is ignored in both cases. So just
except OSError:
pass
is sufficient IMHO -- after all, what else can you do, you can't even print a warning :-)