Repository: cloudstack-cloudmonkey Updated Branches: refs/heads/5.3 91afdd318 -> 47b18bf77
cloudmonkey: fix the weirdest readline import error ever Signed-off-by: Rohit Yadav <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/commit/fc914634 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/tree/fc914634 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/diff/fc914634 Branch: refs/heads/5.3 Commit: fc9146346c00a75137bb7368fc79ee08e151ab04 Parents: 91afdd3 Author: Rohit Yadav <[email protected]> Authored: Fri Dec 5 13:49:48 2014 +0530 Committer: Rohit Yadav <[email protected]> Committed: Fri Dec 5 13:49:48 2014 +0530 ---------------------------------------------------------------------- cloudmonkey/cloudmonkey.py | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/fc914634/cloudmonkey/cloudmonkey.py ---------------------------------------------------------------------- diff --git a/cloudmonkey/cloudmonkey.py b/cloudmonkey/cloudmonkey.py index 3e279b9..1c21e36 100644 --- a/cloudmonkey/cloudmonkey.py +++ b/cloudmonkey/cloudmonkey.py @@ -52,6 +52,10 @@ except ImportError: apicache = {'count': 0, 'verbs': [], 'asyncapis': []} normal_readline = True +# Fix terminal env before importing readline +# Without it, char ESC[?1034h gets printed in output +if os.environ['TERM'].startswith('xterm'): + os.environ['TERM'] = 'vt100' try: import readline except ImportError, e:
