diff options
author | Sol Jerome <sol.jerome@gmail.com> | 2012-06-05 17:00:40 -0500 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2012-06-05 17:00:40 -0500 |
commit | 200f79387247eefa01d60e4f6e573ba5162054bc (patch) | |
tree | 489a8c5b3f4682374b565e602d71b2906f77c3f6 /src/lib/Bcfg2/Server/Admin/Pull.py | |
parent | f31d06a61e3a246118bab537923e1039ba3a2571 (diff) | |
download | bcfg2-200f79387247eefa01d60e4f6e573ba5162054bc.tar.gz bcfg2-200f79387247eefa01d60e4f6e573ba5162054bc.tar.bz2 bcfg2-200f79387247eefa01d60e4f6e573ba5162054bc.zip |
PY3K: Refactor input code
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src/lib/Bcfg2/Server/Admin/Pull.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Admin/Pull.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/Bcfg2/Server/Admin/Pull.py b/src/lib/Bcfg2/Server/Admin/Pull.py index daf353107..816fd2ca7 100644 --- a/src/lib/Bcfg2/Server/Admin/Pull.py +++ b/src/lib/Bcfg2/Server/Admin/Pull.py @@ -2,6 +2,7 @@ import getopt import sys import Bcfg2.Server.Admin +from Bcfg2.Bcfg2Py3k import input class Pull(Bcfg2.Server.Admin.MetadataCore): @@ -109,11 +110,8 @@ class Pull(Bcfg2.Server.Admin.MetadataCore): (choice.group, choice.prio)) else: print(" => host entry: %s" % (choice.hostname)) - # py3k compatibility - try: - ans = raw_input("Use this entry? [yN]: ") in ['y', 'Y'] - except NameError: - ans = input("Use this entry? [yN]: ") in ['y', 'Y'] + + ans = input("Use this entry? [yN]: ") in ['y', 'Y'] if ans: return choice return False |