handle CLI EOFError
svn: r18561
This commit is contained in:
parent
82eaf45b20
commit
0c346aa16c
@ -274,8 +274,12 @@ class ArgHandler(object):
|
|||||||
{'name' : fullpath})
|
{'name' : fullpath})
|
||||||
answer = None
|
answer = None
|
||||||
while not answer:
|
while not answer:
|
||||||
answer = raw_input(_('OK to overwrite? (yes/no) ') \
|
try:
|
||||||
.encode(sys.getfilesystemencoding()))
|
answer = raw_input(_('OK to overwrite? (yes/no) ') \
|
||||||
|
.encode(sys.getfilesystemencoding()))
|
||||||
|
except EOFError:
|
||||||
|
print
|
||||||
|
sys.exit(0)
|
||||||
if answer.upper() in ('Y', 'YES', _('YES').upper()):
|
if answer.upper() in ('Y', 'YES', _('YES').upper()):
|
||||||
self.__error( _("Will overwrite the existing file: %s")
|
self.__error( _("Will overwrite the existing file: %s")
|
||||||
% fullpath)
|
% fullpath)
|
||||||
|
Loading…
Reference in New Issue
Block a user