[setup] fix #360

This commit is contained in:
Max Zwiessele 2016-04-04 10:21:03 +01:00
parent 5e0cc647b6
commit 14c881834e

View file

@ -182,6 +182,8 @@ if not os.path.exists(user_file):
if os.path.exists(old_user_file): if os.path.exists(old_user_file):
# Move it to new location: # Move it to new location:
print("GPy: Found old config file, moving to new location {}".format(user_file)) print("GPy: Found old config file, moving to new location {}".format(user_file))
if not os.path.exists(os.path.dirname(user_file)):
os.makedirs(os.path.dirname(user_file))
os.rename(old_user_file, user_file) os.rename(old_user_file, user_file)
else: else:
# No config file exists, save informative stub to user config folder: # No config file exists, save informative stub to user config folder: