X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Futils.py;h=6a0e5321545a943ea285f8e52b728335591cb5e7;hb=e6ff9b65bc4a3db801db6ef7dd6932866c0f13ae;hp=0b9fa8416ac33099f71ed828ebdd1f9913fa0208;hpb=c167da7716976d943d9eece5aca235931b043cb4;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py index 0b9fa841..6a0e5321 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -36,7 +36,6 @@ import stat import apt_pkg import time import re -import string import email as modemail import subprocess @@ -45,8 +44,7 @@ from dak_exceptions import * from textutils import fix_maintainer from regexes import re_html_escaping, html_escaping, re_single_line_field, \ re_multi_line_field, re_srchasver, re_taint_free, \ - re_gpg_uid, re_re_mark, re_whitespace_comment, re_issource, \ - re_is_orig_source + re_gpg_uid, re_re_mark, re_whitespace_comment, re_issource from formats import parse_format, validate_changes_format from srcformats import get_format_from_string @@ -616,7 +614,7 @@ def send_mail (message, filename=""): if len(match) == 0: del message_raw[field] else: - message_raw.replace_header(field, string.join(match, ", ")) + message_raw.replace_header(field, ', '.join(match)) # Change message fields in order if we don't have a To header if not message_raw.has_key("To"): @@ -1488,7 +1486,7 @@ def is_email_alias(email): ################################################################################ -def get_changes_files(dir): +def get_changes_files(from_dir): """ Takes a directory and lists all .changes files in it (as well as chdir'ing to the directory; this is due to broken behaviour on the part of p-u/p-a @@ -1498,10 +1496,10 @@ def get_changes_files(dir): """ try: # Much of the rest of p-u/p-a depends on being in the right place - os.chdir(dir) - changes_files = [x for x in os.listdir(dir) if x.endswith('.changes')] + os.chdir(from_dir) + changes_files = [x for x in os.listdir(from_dir) if x.endswith('.changes')] except OSError, e: - fubar("Failed to read list from directory %s (%s)" % (dir, e)) + fubar("Failed to read list from directory %s (%s)" % (from_dir, e)) return changes_files