From 079396d64fd3ac5a399b46e7a41b5f4924a82699 Mon Sep 17 00:00:00 2001 From: Harald Hoyer <harald@redhat.com> Date: Fri, 18 Feb 2011 14:05:34 +0100 Subject: [PATCH] pybootchartgui/main.py.in: catch IOError and print error message --- pybootchartgui/main.py.in | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/pybootchartgui/main.py.in b/pybootchartgui/main.py.in index cd5f273..810af12 100644 --- a/pybootchartgui/main.py.in +++ b/pybootchartgui/main.py.in @@ -144,6 +144,9 @@ def main(argv=None): finally: f.close() filename = _get_filename(args, options) + if not os.access(filename, os.W_OK): + print("Can't write to %s" % filename); + return 2 def render(): batch.render(writer, res, options, filename) if options.profile: