1.1 --- a/imiptools/profile.py Mon Jan 30 23:23:30 2017 +0100
1.2 +++ b/imiptools/profile.py Mon Jan 30 23:28:11 2017 +0100
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 User profile management.
1.6
1.7 -Copyright (C) 2015, 2016 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2015, 2016, 2017 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This program is free software; you can redistribute it and/or modify it under
1.11 the terms of the GNU General Public License as published by the Free Software
1.12 @@ -19,7 +19,7 @@
1.13 this program. If not, see <http://www.gnu.org/licenses/>.
1.14 """
1.15
1.16 -from imiptools import config
1.17 +from imiptools.config import settings
1.18 from imiptools.dates import get_default_timezone
1.19 from imiptools.filesys import fix_permissions, FileBase
1.20 from os.path import exists, isdir
1.21 @@ -42,18 +42,18 @@
1.22
1.23 known_keys = {
1.24 "CN" : "",
1.25 - "LANG" : config.LANG,
1.26 "TZID" : get_default_timezone(),
1.27 - "add_method_response" : config.ADD_RESPONSE_DEFAULT,
1.28 - "event_refreshing" : config.REFRESHING_DEFAULT,
1.29 - "freebusy_bundling" : config.BUNDLING_DEFAULT,
1.30 - "freebusy_messages" : config.NOTIFYING_DEFAULT,
1.31 - "freebusy_offers" : config.FREEBUSY_OFFER_DEFAULT,
1.32 - "freebusy_publishing" : config.PUBLISHING_DEFAULT,
1.33 - "freebusy_sharing" : config.SHARING_DEFAULT,
1.34 - "incoming" : config.INCOMING_DEFAULT,
1.35 - "organiser_replacement" : config.ORGANISER_REPLACEMENT_DEFAULT,
1.36 - "participating" : config.PARTICIPATING_DEFAULT,
1.37 + "LANG" : settings["LANG"],
1.38 + "add_method_response" : settings["ADD_RESPONSE_DEFAULT"],
1.39 + "event_refreshing" : settings["REFRESHING_DEFAULT"],
1.40 + "freebusy_bundling" : settings["BUNDLING_DEFAULT"],
1.41 + "freebusy_messages" : settings["NOTIFYING_DEFAULT"],
1.42 + "freebusy_offers" : settings["FREEBUSY_OFFER_DEFAULT"],
1.43 + "freebusy_publishing" : settings["PUBLISHING_DEFAULT"],
1.44 + "freebusy_sharing" : settings["SHARING_DEFAULT"],
1.45 + "incoming" : settings["INCOMING_DEFAULT"],
1.46 + "organiser_replacement" : settings["ORGANISER_REPLACEMENT_DEFAULT"],
1.47 + "participating" : settings["PARTICIPATING_DEFAULT"],
1.48 "permitted_times" : None,
1.49 }
1.50
1.51 @@ -103,7 +103,7 @@
1.52 }
1.53
1.54 def __init__(self, user, store_dir=None):
1.55 - FileBase.__init__(self, store_dir or config.PREFERENCES_DIR)
1.56 + FileBase.__init__(self, store_dir or settings["PREFERENCES_DIR"])
1.57 self.user = user
1.58
1.59 def get(self, name, default=None, config_default=False):