Mon, 29 Sep 2014 03:29:20 +0300
- fixed crash on listdevemails if there are no emails
cobalt.py | file | annotate | diff | comparison | revisions |
--- a/cobalt.py Mon Sep 29 03:26:45 2014 +0300 +++ b/cobalt.py Mon Sep 29 03:29:20 2014 +0300 @@ -847,9 +847,13 @@ elif command == 'listdevemails': check_admin (sender, ident, host, command) - for dev, emails in g_config['developer_emails'].iteritems(): - self.privmsg (replyto, 'Emails for %s: %s' % (dev, ', '.join (emails))) - #done + if 'developer_emails' in g_config: + for dev, emails in g_config['developer_emails'].iteritems(): + self.privmsg (replyto, 'Emails for %s: %s' % (dev, ', '.join (emails))) + #done + else + self.privmsg (replyto, 'No dev emails.') + #fi elif command == 'checkhg': check_admin (sender, ident, host, command) global repocheck_timeout