- don't crash if ticket data doesn't have a reporter name (can happen if the reporter is banned)

Mon, 09 Jun 2014 02:06:23 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Mon, 09 Jun 2014 02:06:23 +0300
changeset 4
bd9508f8a10f
parent 3
53486417a8e5
child 5
b6d2b7de0a6d

- don't crash if ticket data doesn't have a reporter name (can happen if the reporter is banned)

cobalt.py file | annotate | diff | comparison | revisions
--- a/cobalt.py	Sun May 25 15:24:07 2014 +0300
+++ b/cobalt.py	Mon Jun 09 02:06:23 2014 +0300
@@ -238,7 +238,7 @@
 			self.privmsg (replyto, "Issue %s: %s: Reporter: %s, assigned to: %s, status: %s (%s)" % \
 				(ticket, \
 				data.summary, \
-				data.reporter.name, \
+				data.reporter.name if hasattr (data.reporter, 'name') else "<unknown>", \
 				data.handler.name if hasattr (data, 'handler') else "nobody", \
 				data.status.name, \
 				data.resolution.name))

mercurial