Skip to content

Commit 34a7431

Browse files
committed
Add code to print the cause of error.
1 parent 002181a commit 34a7431

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

about_code_tool/genattrib.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,9 @@ def main(parser, options, args):
224224
try:
225225
with open(output_path, "w") as f:
226226
f.write(attrib_str)
227-
except:
228-
print("Problem occurs. Attribution is not generated.")
227+
except Exception as e:
228+
print("Problem occurs. Attribution was not generated.")
229+
print(e)
229230

230231
# Clear the log file
231232
with open(join(dirname(output_path), LOG_FILENAME), 'w'):

0 commit comments

Comments
 (0)