Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f609158

Browse files
committed
Adding new error message (when short options carry illegal '=')
1 parent 383316f commit f609158

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/parse/cmdline.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,8 @@ def _(self, *args):
867867
for i in xrange(len(argv)):
868868
if argv[i] == "-hh":
869869
argv[i] = "-h"
870+
elif re.search(r"\A-\w=.+", argv[i]):
871+
print "[!] potentially miswritten (illegal '=') short option detected ('%s')" % argv[i]
870872
elif argv[i] == "-H":
871873
if i + 1 < len(argv):
872874
extraHeaders.append(argv[i + 1])

0 commit comments

Comments
 (0)