aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'gkeys/config.py')
-rw-r--r--gkeys/config.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/gkeys/config.py b/gkeys/config.py
index ae6e68c..7cefe92 100644
--- a/gkeys/config.py
+++ b/gkeys/config.py
@@ -65,8 +65,12 @@ class GKeysConfig(GPGConfig):
self.defaults['config'] = config
self.defaults['configdir'] = os.path.dirname(config)
else:
- self.defaults['configdir'] = path([self.root, EPREFIX, '/etc/gkeys'])
- self.defaults['config'] = '%(configdir)s/gkeys.conf'
+ homedir = os.path.expanduser('~')
+ self.defaults['configdir'] = homedir
+ self.defaults['config']= os.path.join(homedir, '.gkeys.conf')
+ if not os.path.exists(self.defaults['config']):
+ self.defaults['configdir'] = path([self.root, EPREFIX, '/etc/gkeys'])
+ self.defaults['config'] = '%(configdir)s/gkeys.conf'
self.configparser = None
self._add_gkey_defaults()
if read_configfile: