Anton Shestakov <av6@dwimlabs.net>, Mon, 18 Jul 2016 19:16:00 +0800
rollbot: move logging below the lookups, split the line
Helps keeping options and their defaults closer.
--- a/rollbot.py Mon Jul 18 19:12:06 2016 +0800
+++ b/rollbot.py Mon Jul 18 19:16:00 2016 +0800
group.add_argument('-d', '--debug', help='set logging to DEBUG', const=logging.DEBUG, **extra)
args = parser.parse_args()
- logging.basicConfig(level=args.loglevel, format='%(asctime)s %(levelname)-8s %(message)s')
config = yaml.safe_load(args.config) if hasattr(args, 'config') else {}
jid = lookup('jid', args, config)
nick = lookup('nick', args, config, default='rollbot')
prefix = lookup('prefix', args, config, default='!')
+ format='%(asctime)s %(levelname)-8s %(message)s')
rollbot = RollBot(jid, password, nick, prefix)
rollbot.auto_authorize = True
rollbot.auto_subscribe = True