From: Renz Christian Bagaporo Date: Wed, 21 Nov 2018 08:58:22 +0000 (+0800) Subject: ldgen: catch exception with python3 compatible style X-Git-Tag: v3.3-beta1~80^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8eeddd287cccd257d6adc5fcbc22e0b19985999d;p=esp-idf ldgen: catch exception with python3 compatible style Closes https://github.com/espressif/esp-idf/issues/2720 --- diff --git a/tools/ldgen/ldgen.py b/tools/ldgen/ldgen.py index bb70950d11..ca12fe8e87 100755 --- a/tools/ldgen/ldgen.py +++ b/tools/ldgen/ldgen.py @@ -91,8 +91,7 @@ def main(): script_model.fill(mapping_rules, sdkconfig) script_model.write(output_file) - - except Exception, e: + except Exception as e: print("linker script generation failed for %s\nERROR: %s" % (input_file.name, e.message)) # Delete the file so the entire build will fail; and not use an outdated script. os.remove(output_file.name)