Skip to content

Commit

Permalink
Merge branch 'choose_install_path' into 'master'
Browse files Browse the repository at this point in the history
Add option to choose install path



See merge request !28
  • Loading branch information
LucianoPC committed Aug 3, 2016
2 parents 043cc36 + fa4d244 commit 49fac1a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions apprecommender/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ def __init__(self):
os.abort()
if not hasattr(self, 'initialized'):
# data_source options
# self.base_dir = '/var/lib/apprecommender'
self.base_dir = os.path.expanduser('~/.app-recommender')
self.base_dir = os.environ.get(
'APPREC_DATA', '~/.apprecommender')
self.base_dir = os.path.expanduser(self.base_dir)
self.output = os.path.join(self.home_dir, 'apprec.log')
self.user_data_dir = os.path.join(self.base_dir, "user_data/")
# general options
Expand Down Expand Up @@ -127,8 +128,9 @@ def load_config_file(self):
"""
self.debug = int(self.read_option('general', 'debug'))
self.debug = int(self.read_option('general', 'verbose'))
self.base_dir = os.path.expanduser(
self.read_option('data_sources', 'base_dir'))
self.base_dir = os.environ.get(
'APPREC_DATA', '~/.apprecommender')
self.base_dir = os.path.expanduser(self.base_dir)
self.output = os.path.join(
self.home_dir, self.read_option('data_sources',
'output'))
Expand Down

0 comments on commit 49fac1a

Please sign in to comment.