Merge pull request #3037 from immanetize/rax-expanduser
use expanduser() before testing user_data as file
This commit is contained in:
commit
a7e399955f
1 changed files with 2 additions and 1 deletions
|
@ -285,8 +285,9 @@ def create(module, names=[], flavor=None, image=None, meta={}, key_name=None,
|
|||
if user_data:
|
||||
config_drive = True
|
||||
|
||||
if user_data and os.path.isfile(user_data):
|
||||
if user_data and os.path.isfile(os.path.expanduser(user_data)):
|
||||
try:
|
||||
user_data = os.path.expanduser('user_data')
|
||||
f = open(user_data)
|
||||
user_data = f.read()
|
||||
f.close()
|
||||
|
|
Loading…
Add table
Reference in a new issue