From 7f45c9edf72c10ffa3ab3b29ea76688889b7350f Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Wed, 21 May 2014 16:42:13 -0700 Subject: [PATCH] Have ec2.py expand tilde and vars when looking up the EC2_INI_PATH env variable --- contrib/inventory/ec2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/inventory/ec2.py b/contrib/inventory/ec2.py index f2d9b51c903..a8e042e3f4b 100755 --- a/contrib/inventory/ec2.py +++ b/contrib/inventory/ec2.py @@ -192,7 +192,7 @@ class Ec2Inventory(object): else: config = configparser.ConfigParser() 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) # is eucalyptus?