cpython: 4c2b77d0680b (original) (raw)

Mercurial > cpython

changeset 93123:4c2b77d0680b 3.4

#18853: Fix resource warning in shlex's __main__ section. Report and original fix by Vajrasky Kok. [#18853]

R David Murray rdmurray@bitdance.com
date Fri, 17 Oct 2014 20:28:47 -0400
parents e9cb45ccf42b
children 8ed630f28753 7c183c782401
files Lib/shlex.py Misc/NEWS
diffstat 2 files changed, 13 insertions(+), 9 deletions(-)[+] [-] Lib/shlex.py 20 Misc/NEWS 2

line wrap: on

line diff

--- a/Lib/shlex.py +++ b/Lib/shlex.py @@ -290,15 +290,17 @@ def quote(s): return "'" + s.replace("'", "'"'"'") + "'" +def _print_tokens(lexer):

+ if name == 'main': if len(sys.argv) == 1:

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -33,6 +33,8 @@ Core and Builtins Library ------- +- Issue #18853: Fixed ResourceWarning in shlex.nain. +