Skip to content

Commit 4f40285

Browse files
committed
localise the raw_input workaround to useradm
1 parent 6fd7930 commit 4f40285

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

mig/shared/compat.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@
4646
_TYPE_UNICODE = type(u"")
4747

4848

49-
if not PY2:
50-
raw_input = input
51-
52-
5349
def _is_unicode(val):
5450
"""Return boolean indicating if the value is a unicode string.
5551

mig/shared/useradm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
from mig.shared.base import client_id_dir, client_dir_id, client_alias, \
4848
get_client_id, extract_field, fill_user, fill_distinguished_name, \
4949
is_gdp_user, mask_creds, sandbox_resource
50-
from mig.shared.compat import raw_input, _unicode_string_to_escaped_unicode
50+
from mig.shared.compat import PY2, _unicode_string_to_escaped_unicode
5151
from mig.shared.conf import get_configuration_object
5252
from mig.shared.configuration import Configuration
5353
from mig.shared.defaults import user_db_filename, keyword_auto, ssh_conf_dir, \
@@ -86,6 +86,9 @@
8686
force_update_user_map, force_update_resource_map, force_update_vgrid_map, \
8787
VGRIDS, OWNERS, MEMBERS
8888

89+
if not PY2:
90+
raw_input = input
91+
8992
ssh_authkeys = os.path.join(ssh_conf_dir, authkeys_filename)
9093
ssh_authpasswords = os.path.join(ssh_conf_dir, authpasswords_filename)
9194
ssh_authdigests = os.path.join(ssh_conf_dir, authdigests_filename)

0 commit comments

Comments
 (0)