aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-08-07 13:19:58 -0400
committerW. Trevor King <wking@drexel.edu>2009-08-07 13:19:58 -0400
commit9e2b59eb77c844576203d202939b837788f634a8 (patch)
treee9874016ff714c5443cf8a307d8e54ce355cf9bd
parente8d8f2c829ba4bd062c21a9f75f338ad7e0c5053 (diff)
downloadbugseverywhere-9e2b59eb77c844576203d202939b837788f634a8.tar.gz
Protect bug html from libbe.settings_object.EMPTY
-rw-r--r--becommands/html.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/becommands/html.py b/becommands/html.py
index 60a0461..c44d9a6 100644
--- a/becommands/html.py
+++ b/becommands/html.py
@@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""Generate a static HTML dump of the current repository status"""
-from libbe import cmdutil, bugdir, bug
+from libbe import cmdutil, bugdir, bug, settings_object
#from html_data import *
import codecs, os, re, string, time
@@ -523,15 +523,19 @@ class BEHTMLGen():
bug_ = self.bd.bug_from_shortname(bug.uuid)
bug_.load_comments(load_full=True)
+ def empty_protected_string(value):
+ if value == settings_object.EMPTY:
+ return ""
+ return value
FD.write(self.detail_line%("ID : ", bug.uuid))
FD.write(self.detail_line%("Short name : ", bug.uuid[0:3]))
- FD.write(self.detail_line%("Severity : ", bug.severity))
- FD.write(self.detail_line%("Status : ", bug.status))
- FD.write(self.detail_line%("Assigned : ", bug.assigned))
- FD.write(self.detail_line%("Target : ", bug.target))
- FD.write(self.detail_line%("Reporter : ", bug.reporter))
- FD.write(self.detail_line%("Creator : ", bug.creator))
- FD.write(self.detail_line%("Created : ", bug.time_string))
+ FD.write(self.detail_line%("Severity : ", empty_protected_string(bug.severity)))
+ FD.write(self.detail_line%("Status : ", empty_protected_string(bug.status)))
+ FD.write(self.detail_line%("Assigned : ", empty_protected_string(bug.assigned)))
+ FD.write(self.detail_line%("Target : ", empty_protected_string(bug.target)))
+ FD.write(self.detail_line%("Reporter : ", empty_protected_string(bug.reporter)))
+ FD.write(self.detail_line%("Creator : ", empty_protected_string(bug.creator)))
+ FD.write(self.detail_line%("Created : ", empty_protected_string(bug.time_string)))
FD.write(self.detail_line%("Summary : ", bug.summary))
FD.write("<tr><td colspan=2><hr></td></tr>")
FD.write(self.begin_comment_section)