Download:
child 4:4b0145336c46
parent 2:11e99d62ba12
3:12c6cbab21e4
Anton Shestakov <av6@dwimlabs.net>, Mon, 09 May 2016 21:51:10 +0800
rollbot: add --quiet in addition to --debug

1 файлов изменено, 4 вставок(+), 1 удалений(-) [+]
rollbot.py file | annotate | diff | comparison | revisions
--- a/rollbot.py Mon May 09 21:25:51 2016 +0800
+++ b/rollbot.py Mon May 09 21:51:10 2016 +0800
@@ -44,7 +44,10 @@
parser.add_argument('-j', '--jid', dest='jid', help='JID to use')
parser.add_argument('-p', '--password', dest='password', help='password to use')
parser.add_argument('-n', '--nick', dest='nick', help='MUC nickname', default='rollbot')
- parser.add_argument('-d', '--debug', help='set logging to DEBUG', action='store_const', dest='loglevel', const=logging.DEBUG, default=logging.INFO)
+
+ group = parser.add_mutually_exclusive_group()
+ group.add_argument('-q', '--quiet', help='set logging to ERROR', action='store_const', dest='loglevel', const=logging.ERROR, default=logging.INFO)
+ group.add_argument('-d', '--debug', help='set logging to DEBUG', action='store_const', dest='loglevel', const=logging.DEBUG, default=logging.INFO)
args = parser.parse_args()