--- a/rollbot.py Fri Jun 03 11:36:03 2016 +0800
+++ b/rollbot.py Fri Jun 24 07:36:35 2016 +0800
group.add_argument('--prefix', help='command prefix (default: !)')
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)
+ extra = dict(action='store_const', dest='loglevel', default=logging.INFO)
+ group.add_argument('-q', '--quiet', help='set logging to ERROR', const=logging.ERROR, **extra)
+ group.add_argument('-d', '--debug', help='set logging to DEBUG', const=logging.DEBUG, **extra)
args = parser.parse_args()