[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] 01/02: mitm standalone takes cli args
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] 01/02: mitm standalone takes cli args |
Date: |
Fri, 28 Apr 2017 10:31:01 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant.
commit 8a4eebe9429c6e4679c23c0580dc1f299ce84b80
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri Apr 28 10:19:36 2017 +0200
mitm standalone takes cli args
---
src/mitm/taler-merchant-mitm.py | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/src/mitm/taler-merchant-mitm.py b/src/mitm/taler-merchant-mitm.py
new file mode 100755
index 0000000..08067bc
--- /dev/null
+++ b/src/mitm/taler-merchant-mitm.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python3
+
+"""
+Stand-alone script to manage the merchant's MITM
+error generator.
+"""
+
+import argparse
+import sys
+
+parser = argparse.ArgumentParser()
+
+parser.add_argument('--exchange',
+ '-e',
+ help="Exchange URL",
+ metavar="URL",
+ type=str,
+ dest="exchange_url",
+ default=None)
+
+
+parser.add_argument("--port",
+ "-p",
+ help="Port where the MITM listens",
+ dest="port",
+ type=int,
+ default=5000,
+ metavar="PORT")
+
+args = parser.parse_args()
+
+if getattr(args, 'exchange_url', None) is None:
+ parser.print_help()
+ sys.exit(1)
--
To stop receiving notification emails like this one, please contact
address@hidden