[Git][reproducible-builds/diffoscope][master] Fail more gracefully when running out of diskspace. (Closes: #874582)

Chris Lamb gitlab at salsa.debian.org
Sun Apr 28 17:28:19 CEST 2019



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
dc5ad047 by Vibhu at 2019-04-28T15:25:44Z
Fail more gracefully when running out of diskspace. (Closes: #874582)

We catches the ENOSPC OSError at the top level and exit diffoscope without
printing the complete traceback. Other errors are raised and handled normally.

Signed-off-by: Chris Lamb <lamby at debian.org>

- - - - -


1 changed file:

- diffoscope/main.py


Changes:

=====================================
diffoscope/main.py
=====================================
@@ -723,6 +723,11 @@ def main(args=None):
         with setup_logging(parsed_args.debug, log_handler) as logger:
             post_parse(parsed_args)
             sys.exit(run_diffoscope(parsed_args))
+    except OSError as e:
+        if e.errno != errno.ENOSPC:
+            raise
+        logger.error('No space left on device. Diffoscope exiting.')
+        sys.exit(1)
     except KeyboardInterrupt:
         logger.error('Keyboard Interrupt')
         sys.exit(2)



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/dc5ad047f2e8a6baad7aeee7732664f2faeb7051

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/dc5ad047f2e8a6baad7aeee7732664f2faeb7051
You're receiving this email because of your account on salsa.debian.org.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20190428/f6c941b3/attachment.html>


More information about the rb-commits mailing list