Improve error output.

This commit is contained in:
Markus Birth 2018-11-26 11:55:22 +01:00
parent a5dab10c5d
commit 32a2335821
3 changed files with 4 additions and 3 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
*.log
*.pyc
/.last_file
/export.csv
/mosobjects.db3

View File

@ -37,7 +37,6 @@ msg.attach(att)
#print(repr(clips))
print(msg.as_string())
p = Popen(["/usr/sbin/sendmail", "-oi", "markus.birth@weltn24.de", "sebastian.erb@weltn24.de"], stdin=PIPE)
p.communicate(msg.as_bytes())

View File

@ -68,8 +68,8 @@ for file in files_to_parse:
except ET.ParseError as e:
print("ERROR parsing {}: {}".format(file, e), file=sys.stderr)
break
except:
print("ERROR processing {}!".format(file), file=sys.stderr)
except Exception as e:
print("ERROR processing {} - {}!".format(file, e), file=sys.stderr)
break
db.finish()