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

Skip to content

Commit f03c692

Browse files
committed
Use os.environ.get() in stead of os.getenv() (which is platform-dependent).
1 parent aeb6a60 commit f03c692

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/getopt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def gnu_getopt(args, shortopts, longopts = []):
117117
if shortopts.startswith('+'):
118118
shortopts = shortopts[1:]
119119
all_options_first = True
120-
elif os.getenv("POSIXLY_CORRECT"):
120+
elif os.environ.get("POSIXLY_CORRECT"):
121121
all_options_first = True
122122
else:
123123
all_options_first = False

0 commit comments

Comments
 (0)