summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Liechti <cliechti@gmx.net>2015-08-05 02:36:14 +0200
committerChris Liechti <cliechti@gmx.net>2015-08-05 02:36:14 +0200
commit9109091c781faaff8a86c4ad63edfc4f6530f39f (patch)
treef4920a65ac629f1912d24e9db641d0b6a630f7ac
parent074477323aead37467e8c72d84256f629fdd5fb6 (diff)
downloadpyserial-git-9109091c781faaff8a86c4ad63edfc4f6530f39f.tar.gz
miniterm: add --develop to show tracebacks
-rw-r--r--serial/tools/miniterm.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/serial/tools/miniterm.py b/serial/tools/miniterm.py
index e5a7d99..761b5b2 100644
--- a/serial/tools/miniterm.py
+++ b/serial/tools/miniterm.py
@@ -597,6 +597,15 @@ def main():
default = False
)
+ group.add_option("", "--develop",
+ dest = "develop",
+ action = "store_true",
+ help = "show Python traceback on error",
+ default = False
+ )
+
+
+
parser.add_option_group(group)
@@ -655,6 +664,8 @@ def main():
)
except serial.SerialException as e:
sys.stderr.write("could not open port %r: %s\n" % (port, e))
+ if options.develop:
+ raise
sys.exit(1)
if not options.quiet: