Skip to content

Commit

Permalink
Another attempt at dealing with python version 2.6 for fabric api
Browse files Browse the repository at this point in the history
  • Loading branch information
mcianfrocco committed May 16, 2017
1 parent 5ad5a55 commit d4cb0d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aws/launch_AWS_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,12 @@ 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)
if float(sys.version_info[1])<7:
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 d4cb0d8

Please sign in to comment.