Skip to content

Commit

Permalink
python 2.6 bug fixed?
Browse files Browse the repository at this point in the history
  • Loading branch information
mcianfrocco committed May 17, 2017
1 parent d4cb0d8 commit 4edc51d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions aws/launch_AWS_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,9 @@ def module_exists(module_name):
def exec_remote_cmd(cmd):
from fabric.operations import run, put
from fabric.api import hide,settings
if float(sys.version_info[1])==float(6):
with hide('output','running','warnings') and settings(warn_only=True):
return run(cmd)
if float(sys.version_info[1])>=7:
with hide('output','running','warnings'), settings(warn_only=True):
return run(cmd)
with hide('output','running','warnings') and settings(warn_only=True):
return run(cmd)

#==============================
def query_yes_no(question, default="no"):
valid = {"yes": True, "y": True, "ye": True,"no": False, "n": False}
Expand Down

0 comments on commit 4edc51d

Please sign in to comment.