Hello Ximin, Am 27.09.18 um 05:46 schrieb Ximin Luo: > Carsten Schoenert: >> [..] >> it seems some more fencing is needed. >> Even with the fix Christoph is suggesting I get some error like the one >> above. >> >> If I add the following additions it works better. Note, I'm not a Python >> programmer so this might done in a better way. :) >> >> @@ -70,7 +71,7 @@ def run(cmdline, verbose=False): >> subprocess.check_call(cmdline) >> >> def get_all_packages(): >> - lines = open("debian/control").readlines() >> + lines = open("debian/control", encoding='utf8').readlines() >> package_lines = [x for x in lines if x.find("Package:") >= 0] >> packages = [p[p.find(":")+1:].strip() for p in package_lines] >> packages = [p for p in packages if p.startswith("webext-")] >> @@ -143,7 +144,7 @@ def install_webext(*args): >> args, unknown = parser.parse_known_args(args) >> if unknown: >> log("Ignored some command-line arguments: %r" % unknown) >> - packages = args.packages or get_all_packages() >> + packages = [x.decode('UTF8') for x in args.packages] or >> [x.decode('UTF8') for x in get_all_packages()] >> >> home = args.home >> name = args.name >> > > On my computer here only the first hunk is necessary. Can you try > without the second hunk? I can't see why it should be necessary.
Sure, will look into this again later the day or over the weekend. As written, I'm not a experienced Python programmer. :-) But yes, looking at the second time on it I agree, the variable is already filled up by the UTF8 encoded reading of debian/control. Shouldn't be really needed here. -- Regards Carsten Schoenert