X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=queue_rss.py;h=9ca66abbe435ad9654c64a37477bc029bdf10f2e;hb=85b3fceb9e5dc94877dd02e9fa990dd52c8eef36;hp=783e5ae17eb21fb66e84608eecdf36b8cce2ea7f;hpb=aa091b6e01202b8540fed516dc3d8e18a5dfc931;p=dak.git diff --git a/queue_rss.py b/queue_rss.py index 783e5ae1..9ca66abb 100755 --- a/queue_rss.py +++ b/queue_rss.py @@ -176,11 +176,19 @@ if __name__ == "__main__": feed_in_file = os.path.join(settings.outdir, inrss_filename) feed_out_file = os.path.join(settings.outdir, outrss_filename) - status.feed_in.write_xml(file(feed_in_file, "w+"), "utf-8") - status.feed_out.write_xml(file(feed_out_file, "w+"), "utf-8") + try: + status.feed_in.write_xml(file(feed_in_file, "w+"), "utf-8") + status.feed_out.write_xml(file(feed_out_file, "w+"), "utf-8") + except IOError, why: + sys.stderr.write("Unable to write feeds: %s\n", why) + sys.exit(1) status.queue = current_queue - cPickle.dump(status, open(status_db, "w+")) + try: + cPickle.dump(status, open(status_db, "w+")) + except IOError, why: + sys.stderr.write("Unable to save status: %s\n", why) + sys.exit(1) # vim:et:ts=4