Have ec2.py expand tilde and vars when looking up the EC2_INI_PATH env variable
This commit is contained in:
parent
73aa5686cc
commit
7f45c9edf7
1 changed files with 1 additions and 1 deletions
|
@ -192,7 +192,7 @@ class Ec2Inventory(object):
|
||||||
else:
|
else:
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
ec2_default_ini_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'ec2.ini')
|
ec2_default_ini_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'ec2.ini')
|
||||||
ec2_ini_path = os.environ.get('EC2_INI_PATH', ec2_default_ini_path)
|
ec2_ini_path = os.path.expanduser(os.path.expandvars(os.environ.get('EC2_INI_PATH', ec2_default_ini_path)))
|
||||||
config.read(ec2_ini_path)
|
config.read(ec2_ini_path)
|
||||||
|
|
||||||
# is eucalyptus?
|
# is eucalyptus?
|
||||||
|
|
Loading…
Reference in a new issue