- fixed crash on listdevemails if there are no emails

Mon, 29 Sep 2014 03:29:20 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Mon, 29 Sep 2014 03:29:20 +0300
changeset 30
114afc110afd
parent 29
5767ee263b12
child 31
4e3259daa425

- 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

mercurial