X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=daklib%2Futils.py;h=90c87bf4435fa6e0a625dfbb1ef76c017fcc87fe;hb=8ddfb3391d47d9b73c90948b521b6b0a76add4b7;hp=30683097b57d7b61d666e5115b6f01f50739cd9a;hpb=f5255d39ec6915a97fdccfc536479d579b5f19a3;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py index 30683097..90c87bf4 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) @@ -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)