From 1754b3c3011b3795a0bff03bdfdc30c7418b1a62 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Sun, 1 Nov 2015 19:18:37 +0200 Subject: Don't lose output silently when overwrite of the output file is denied If the move resulted in EPERM, discard the temporary output file, but raise the error so that the tool exits with a nonzero status. https://bugzilla.gnome.org/show_bug.cgi?id=757442 --- giscanner/scannermain.py | 1 - 1 file changed, 1 deletion(-) diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py index 628528f8..42466b90 100755 --- a/giscanner/scannermain.py +++ b/giscanner/scannermain.py @@ -465,7 +465,6 @@ def write_output(data, options): except OSError as e: if e.errno == errno.EPERM: os.unlink(main_f_name) - return 0 raise return 0 else: -- cgit v1.2.1