git.99rst.org
/
redacted-XKCD-password-generator.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
5a7c238
)
Explicitly derive the command name from command-line arguments.
author
Ben Finney
<redacted>
Wed, 2 Mar 2016 04:40:40 +0000
(15:40 +1100)
committer
Ben Finney
<redacted>
Wed, 2 Mar 2016 04:41:15 +0000
(15:41 +1100)
xkcdpass/xkcd_password.py
patch
|
blob
|
history
diff --git
a/xkcdpass/xkcd_password.py
b/xkcdpass/xkcd_password.py
index 9b5f81626c72c0593aa63004cf329240e3fb6985..65d6758f54e3adb10f108a6f9a37071444e50ccc 100755
(executable)
--- a/
xkcdpass/xkcd_password.py
+++ b/
xkcdpass/xkcd_password.py
@@
-3,6
+3,7
@@
import random
import os
+import os.path
import optparse
import re
import math
@@
-316,7
+317,8
@@
class XkcdPassOptionParser(optparse.OptionParser, object):
def main():
count = 1
- parser = XkcdPassOptionParser()
+ program_name = os.path.basename(sys.argv[0])
+ parser = XkcdPassOptionParser(prog=program_name)
(options, args) = parser.parse_args()
validate_options(parser, options, args)
git clone https://git.99rst.org/PROJECT