Verified Commit f9dc13a5 authored by Karel Koci's avatar Karel Koci 🤘
Browse files

Fix None coparison for execution without arguments

This is simple issue. We use it as int but if argument is not used the
default is None. We are missing defaults in parser.
parent b6f08132
......@@ -24,12 +24,12 @@ def parse_arguments():
Use this option when this is automatic execution. It prevents run of updater when autorun is not
enabled.
""")
prs.add_argument('--rand-sleep', const=7200, nargs='?', type=int,
prs.add_argument('--rand-sleep', const=7200, nargs='?', type=int, default=0,
help="""
Sleep random amount of the time with maximum of given number of seconds. In default two hours are
used.
""")
prs.add_argument('--wait-for-network', const=PING_TIMEOUT, type=int,
prs.add_argument('--wait-for-network', const=PING_TIMEOUT, type=int, default=10,
nargs='?', help="""
Check if Turris repository is accessible (even before going to background). You can specify timeout
in seconds as an argument. 10 seconds is used if no argument is specified. Specify zero to disable
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment