File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 8
8
import urllib .request
9
9
10
10
11
+ SCRIPT = os .path .basename (__file__ )
11
12
ENDPOINT = "https://registry-test.cilogon.org/registry/"
12
13
13
14
14
- _usage = """\
15
- usage: [PASS=...] {script } [OPTIONS]
15
+ _usage = f """\
16
+ usage: [PASS=...] { SCRIPT } [OPTIONS]
16
17
17
18
OPTIONS:
18
19
-u USER[:PASS] specify USER and optionally PASS on command line
19
20
-d passfd specify open fd to read PASS
20
21
-f passfile specify path to file to open and read PASS
21
22
-e ENDPOINT specify REST endpoint
23
+ (default = { ENDPOINT } )
22
24
-o outfile specify output file (default: write to stdout)
23
25
-h display this help text
24
26
27
29
2. -d passfd (read from fd)
28
30
3. -f passfile (read from file)
29
31
4. read from $PASS env var
30
-
31
- ENDPOINT defaults to {ENDPOINT}
32
32
"""
33
33
34
34
def usage (msg = None ):
35
35
if msg :
36
36
print (msg + "\n " , file = sys .stderr )
37
37
38
- script = os .path .basename (__file__ )
39
- print (_usage .format (script = script , ENDPOINT = ENDPOINT ), file = sys .stderr )
38
+ print (_usage , file = sys .stderr )
40
39
sys .exit ()
41
40
42
41
You can’t perform that action at this time.
0 commit comments