Make Python code more idiomatic

This commit is contained in:
JoeLametta
2018-05-02 08:45:00 +00:00
parent a484815106
commit 2b4140d300
12 changed files with 24 additions and 27 deletions

View File

@@ -36,7 +36,7 @@ def main():
ret = cmd.do()
except SystemError as e:
sys.stderr.write('whipper: error: %s\n' % e)
if (type(e) is common.EjectError and
if (isinstance(e, common.EjectError) and
cmd.options.eject in ('failure', 'always')):
eject_device(e.device)
return 255