X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=tools%2Fqueue_rss.py;h=da74a0dfae7a1b45bb5d8c4f4478945ffd2d4bb6;hb=af80894b172ada51e5536fe36d1ac4385567d0c2;hp=b04816e0c6e91d0132d58197ef57edd00e8427c2;hpb=2a068f576aeaa132f49573bbf1fa337a250481d6;p=dak.git diff --git a/tools/queue_rss.py b/tools/queue_rss.py index b04816e0..da74a0df 100755 --- a/tools/queue_rss.py +++ b/tools/queue_rss.py @@ -42,12 +42,12 @@ class Status: def __init__(self): self.feed_in = PyRSS2Gen.RSS2( title = "Packages entering NEW", - link = "http://ftp-master.debian.org/new.html", + link = "https://ftp-master.debian.org/new.html", description = "Debian packages entering the NEW queue" ) self.feed_out = PyRSS2Gen.RSS2( title = "Packages leaving NEW", - link = "http://ftp-master.debian.org/new.html", + link = "https://ftp-master.debian.org/new.html", description = "Debian packages leaving the NEW queue" ) self.queue = {} @@ -103,7 +103,7 @@ def parse_leave_reason(fname): try: f = open(fname) - except IOError, e: + except IOError as e: sys.stderr.write("Can't open %s: %s\n" % (fname, e)) return {} @@ -138,7 +138,7 @@ def add_rss_item(status, msg, direction): (cgi.escape(msg['Description']), cgi.escape(msg['Changes'])) - link = "http://ftp-master.debian.org/new/%s_%s.html" % \ + link = "https://ftp-master.debian.org/new/%s_%s.html" % \ (msg['Source'], msg['Version']) feed.items.insert(0, @@ -198,10 +198,6 @@ if __name__ == "__main__": status = Status() current_queue = parse_queuedir(settings.queuedir) - if not current_queue: - sys.stderr.write("Unable to scan queuedir '%s'\n" % settings.queuedir) - parser.print_help() - sys.exit(1) update_feeds(current_queue, status, settings) @@ -214,7 +210,7 @@ if __name__ == "__main__": 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: + except IOError as why: sys.stderr.write("Unable to write feeds: %s\n", why) sys.exit(1) @@ -222,7 +218,7 @@ if __name__ == "__main__": try: cPickle.dump(status, open(status_db, "w+")) - except IOError, why: + except IOError as why: sys.stderr.write("Unable to save status: %s\n", why) sys.exit(1)