]> git.decadent.org.uk Git - dak.git/blobdiff - dak/show_deferred.py
Move regexes into a module so we can keep track
[dak.git] / dak / show_deferred.py
index bc2c254a69ad1ae4d60b43bebe7130323b23bc86..6942efbd33a54e179b5c45835007e11dedd40b04 100755 (executable)
@@ -27,9 +27,10 @@ from debian_bundle import deb822
 from daklib import database
 from daklib import queue
 from daklib import utils
+from daklib.regexes import re_htmlescaping, html_escaping
 
 ################################################################################
-### work around bug in debian-python 0.1.10
+### work around bug #487902 in debian-python 0.1.10
 deb822.Changes._multivalued_fields = {
             "files": [ "md5sum", "size", "section", "priority", "name" ],
             "checksums-sha1": ["sha1", "size", "name"],
@@ -40,8 +41,6 @@ deb822.Changes._multivalued_fields = {
 
 row_number = 1
 
-html_escaping = {'"':'&quot;', '&':'&amp;', '<':'&lt;', '>':'&gt;'}
-re_html_escaping = re.compile('|'.join(map(re.escape, html_escaping.keys())))
 def html_escape(s):
     return re_html_escaping.sub(lambda x: html_escaping.get(x.group(0)), s)
 
@@ -154,7 +153,7 @@ def get_upload_data(changesfn):
                 if os.path.exists(qfn):
                     os.symlink(qfn,lfn)
                     os.chmod(qfn, 0644)
-    return (max(delaydays-1,0)*24*60*60+remainingtime, changesname, delay, uploader, achanges.get('closes').split(),achanges)
+    return (max(delaydays-1,0)*24*60*60+remainingtime, changesname, delay, uploader, achanges.get('closes','').split(),achanges)
 
 def list_uploads(filelist):
     uploads = map(get_upload_data, filelist)