[tor-commits] [sbws/master] Add type to cli args that are not str

juga at torproject.org juga at torproject.org
Mon Oct 8 08:14:49 UTC 2018


commit 8aa5da92bd19e407d0ebff3f35e7c6feb634676e
Author: juga0 <juga at riseup.net>
Date:   Wed Oct 3 00:02:04 2018 +0000

    Add type to cli args that are not str
---
 sbws/core/generate.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sbws/core/generate.py b/sbws/core/generate.py
index 6d91690..f00852f 100644
--- a/sbws/core/generate.py
+++ b/sbws/core/generate.py
@@ -49,14 +49,14 @@ def gen_parser(sub):
                    type=int,
                    help="Number of most significant digits to round bw "
                         "when scaling as Torflow. (Default: 3)")
-    p.add_argument('-p', '--secs-recent', default=None,
+    p.add_argument('-p', '--secs-recent', default=None, type=int,
                    help="How many secs in the past are results being "
                         "still considered. Note this value will supersede "
                         "data_period in the configuration. (Default: None)")
-    p.add_argument('-a', '--secs-away', default=DAY_SECS,
+    p.add_argument('-a', '--secs-away', default=DAY_SECS, type=int,
                    help="How many secs results have to be away from each "
                         "other. (Default: 86400 - one day -)")
-    p.add_argument('-n', '--min-num', default=NUM_MIN_RESULTS,
+    p.add_argument('-n', '--min-num', default=NUM_MIN_RESULTS, type=int,
                    help="Mininum number of a results to consider them."
                         "(Default: 2)")
 





More information about the tor-commits mailing list