# HG changeset patch # User Laurent Bessard # Date 1380128778 -7200 # Node ID eb068364ccfa655c49d341f02e9868f07d9f566c # Parent d92a0c3040a4703535d3238025dde6ebbd5fa750 Fixed bug when compiling project which path contains non-ASCII characters diff -r d92a0c3040a4 -r eb068364ccfa LPCtarget/__init__.py --- a/LPCtarget/__init__.py Wed Sep 25 19:04:38 2013 +0200 +++ b/LPCtarget/__init__.py Wed Sep 25 19:06:18 2013 +0200 @@ -15,10 +15,11 @@ def _get_md5_header(self): """Returns signature header""" + buildpath = self.buildpath.encode(sys.getfilesystemencoding()) size = int(Popen( - ['arm-elf-size','-B',os.path.join(self.buildpath,"ArmPLC_rom.elf")], + ['arm-elf-size','-B',os.path.join(buildpath,"ArmPLC_rom.elf")], stdout=PIPE).communicate()[0].splitlines()[1].split()[0]) - res = "&" + hashlib.md5(open(os.path.join(self.buildpath, "ArmPLC_rom.bin"), "rb").read(size)).hexdigest() + '\n' +\ + res = "&" + hashlib.md5(open(os.path.join(buildpath, "ArmPLC_rom.bin"), "rb").read(size)).hexdigest() + '\n' +\ "$" + str(size) + '\n' return res