# HG changeset patch # User Teemu Piippo # Date 1415794950 -7200 # Node ID 3dab1fd47d5138a45be82fdc6fcd023459cd3806 # Parent c6e853703ca8cbe91d1889e130b05434269873d7 - slight rework on bt poll diff -r c6e853703ca8 -r 3dab1fd47d51 bt.py --- a/bt.py Mon Nov 10 17:49:20 2014 +0200 +++ b/bt.py Wed Nov 12 14:22:30 2014 +0200 @@ -104,6 +104,7 @@ user, password = credentials() newid = suds_client.service.mc_issue_get_biggest_id (user, password, 0) except Exception as e: + Irc.broadcast ("Error while polling: %s" % e) pass while newid > btannounce_id: diff -r c6e853703ca8 -r 3dab1fd47d51 mod_bt.py --- a/mod_bt.py Mon Nov 10 17:49:20 2014 +0200 +++ b/mod_bt.py Wed Nov 12 14:22:30 2014 +0200 @@ -13,7 +13,14 @@ { 'name': 'testannounce', 'description': 'Tests the ticket announcer', - 'args': ' ', + 'args': '', + 'level': 'admin', + }, + + { + 'name': 'checkbt', + 'description': 'Polls the bug tracker for new tickets', + 'args': None, 'level': 'admin', }, ] @@ -23,4 +30,7 @@ Bt.get_ticket_data (bot, replyto, args['ticket'], True) def cmd_testannounce (bot, args, **rest): - Bt.announce_new_issue (bot, Bt.get_issue (args['ticket'])) \ No newline at end of file + Bt.announce_new_issue (bot, Bt.get_issue (args['ticket'])) + +def cmd_checkbt (bot, **rest): + Bt.poll() \ No newline at end of file