X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Futils.py;h=a30107be57632d18b3f604cd8a4094395fd19de8;hb=2a10967af5974e4fa513d029fb995e122d90501a;hp=30683097b57d7b61d666e5115b6f01f50739cd9a;hpb=f5255d39ec6915a97fdccfc536479d579b5f19a3;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py index 30683097..a30107be 100644 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -155,11 +155,7 @@ def extract_component_from_section(section, session=None): # Expand default component if component == "": - comp = get_component(section, session) - if comp is None: - component = "main" - else: - component = comp.component_name + component = "main" return (section, component) @@ -570,7 +566,7 @@ def build_file_list(changes, is_a_dsc=0, field="files", hashname="md5sum"): ################################################################################ -# see http://bugs.debian.org/619131 +# see https://bugs.debian.org/619131 def build_package_list(dsc, session = None): if not dsc.has_key("package-list"): return {} @@ -1058,7 +1054,7 @@ def arch_compare_sw (a, b): ################################################################################ -def split_args (s, dwim=1): +def split_args (s, dwim=True): """ Split command line arguments which can be separated by either commas or whitespace. If dwim is set, it will complain about string ending @@ -1381,7 +1377,8 @@ def gpg_get_key_addresses(fingerprint): except IndexError: continue try: - uid = codecs.decode(uid.decode("utf-8"), "unicode_escape") + # Do not use unicode_escape, because it is locale-specific + uid = codecs.decode(uid, "string_escape").decode("utf-8") except UnicodeDecodeError: uid = uid.decode("latin1") # does not fail m = re_parse_maintainer.match(uid) @@ -1560,7 +1557,7 @@ Cnf = config.Config().Cnf def parse_wnpp_bug_file(file = "/srv/ftp-master.debian.org/scripts/masterfiles/wnpp_rm"): """ - Parses the wnpp bug list available at http://qa.debian.org/data/bts/wnpp_rm + Parses the wnpp bug list available at https://qa.debian.org/data/bts/wnpp_rm Well, actually it parsed a local copy, but let's document the source somewhere ;)