Skip to content

Commit 86a6184

Browse files
committed
fix: add help and add empty string filter
Update wait_for_dep.py
1 parent 35ddbad commit 86a6184

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

wait_for_dep/wait_for_dep.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import time
44
import re
55
from urllib.parse import urlparse
6+
import argparse
67

78
scheme_type = r"[a-z0-9]+"
89

@@ -62,11 +63,18 @@ def wait(self, url):
6263

6364
def main():
6465
w = WaitForDep()
65-
args = sys.argv
66-
args.pop(0)
67-
68-
for url in args:
69-
w.wait(url)
66+
67+
68+
parser = argparse.ArgumentParser(description='Process some integers.')
69+
parser.add_argument('urls', metavar='N', type=str, nargs='+',
70+
help='space seperated list of urls to check')
71+
72+
args = parser.parse_args()
73+
urls = args.urls
74+
75+
for url in urls:
76+
if not url == "":
77+
w.wait(url)
7078

7179

7280
if __name__ == "__main__":

0 commit comments

Comments
 (0)