ldgen: catch exception with python3 compatible style

Closes https://github.com/espressif/esp-idf/issues/2720
This commit is contained in:
Renz Christian Bagaporo 2018-11-21 16:58:22 +08:00
parent 56ed588d4f
commit 8eeddd287c

View file

@ -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)