Skip to content

Commit

Permalink
Use the system's default location for config files
Browse files Browse the repository at this point in the history
  • Loading branch information
aaront committed Feb 9, 2016
1 parent d4cb2ff commit fddd474
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mygeotab/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ def __init__(self):

@staticmethod
def _get_config_file():
return os.path.join(os.path.expanduser('~'), '.mygeotab')
config_path = click.get_app_dir(mygeotab.__title__)
if not os.path.exists(config_path):
os.makedirs(config_path)
return os.path.join(config_path, 'config.ini')

@staticmethod
def _section_name(database):
Expand Down

0 comments on commit fddd474

Please sign in to comment.