1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-25 17:36:13 +01:00

- "override" raw_input from __builtin__'s and interpret EOFError (ctrl-d) as user abort (raise oscerr.UserAbort)

This commit is contained in:
Marcus Huewe 2010-12-22 00:01:46 +01:00
parent 046a2be24e
commit 904754987c

View File

@ -5722,6 +5722,14 @@ def get_user_projpkgs(apiurl, user, role=None, exclude_projects=[], proj=True, p
filter_role(res, user, role)
return res
def raw_input(*args):
import __builtin__
try:
__builtin__.raw_input(*args)
except EOFError:
# interpret ctrl-d as user abort
raise oscerr.UserAbort()
# backward compatibility: local role filtering
def filter_role(meta, user, role):
"""