[elbe-devel] [PATCH 2/3] add: change python3-only PermissionError to IOError
Torben Hohn
torben.hohn at linutronix.de
Tue Jul 21 14:46:12 CEST 2020
PermissionError does not exist in python2.
Stay compatible to python2 and use IOError.
Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/commands/add.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/elbepack/commands/add.py b/elbepack/commands/add.py
index d7b238722..cbff3c45e 100644
--- a/elbepack/commands/add.py
+++ b/elbepack/commands/add.py
@@ -41,7 +41,7 @@ def run_command(argv):
try:
xml.xml.write(xmlfile)
sys.exit(0)
- except PermissionError as E:
+ except IOError as E:
print("Unable to truncate file %s: %s" % (xmlfile, E))
sys.exit(20)
--
2.20.1
More information about the elbe-devel
mailing list