summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-05-09 03:12:12 +0200
committeremkael <emkael@tlen.pl>2017-05-09 03:12:12 +0200
commite4e7df2ffcc83ba1cf01f4d6ae54fdbbd90c7c09 (patch)
tree52bb65576e64f4d256900404c27a98f9121fe368
parent927beef1350c93083f28b884d5f393eca396d1b5 (diff)
Improved error handling, MySQL error messages included
-rw-r--r--ausbutler.spec2
-rw-r--r--butler.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/ausbutler.spec b/ausbutler.spec
index 30aa2d8..8528a6d 100644
--- a/ausbutler.spec
+++ b/ausbutler.spec
@@ -1,7 +1,7 @@
import os
a = Analysis(['butler.py'],
pathex=[os.path.abspath('.')],
- hiddenimports=[],
+ hiddenimports=['mysql.connector.locales.eng.client_error'],
hookspath=None,
runtime_hooks=None)
pyz = PYZ(a.pure)
diff --git a/butler.py b/butler.py
index 362213d..7019b61 100644
--- a/butler.py
+++ b/butler.py
@@ -22,7 +22,7 @@ def main():
client = Goniec(load_config('goniec'))
client.send(files)
except Exception as e:
- print str(e)
+ print 'ERROR: %s: %s' % (type(e).__name__, str(e))
if nowait:
raw_input('Press any key to continue...')