1.1 --- a/tools/copy_store.py Tue Jan 31 16:06:40 2017 +0100
1.2 +++ b/tools/copy_store.py Tue Jan 31 16:18:55 2017 +0100
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Copy store information into another store.
1.6
1.7 -Copyright (C) 2014, 2015, 2016 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2014, 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 @@ -31,7 +31,7 @@
1.13 if split(parent)[1] == "imip-agent":
1.14 sys.path.append(parent)
1.15
1.16 -from imiptools import config
1.17 +from imiptools.config import settings
1.18 from imiptools.data import Object
1.19 from imiptools.stores import get_store, get_publisher, get_journal
1.20
1.21 @@ -158,7 +158,7 @@
1.22
1.23 getvalue = lambda value, pos=0, default=None: value and value[pos] or default
1.24
1.25 - from_store_type = getvalue(from_store_args, 0, config.STORE_TYPE)
1.26 + from_store_type = getvalue(from_store_args, 0, settings["STORE_TYPE"])
1.27 from_store_dir = getvalue(from_store_args, 1)
1.28 from_journal_dir = getvalue(from_store_args, 2)
1.29
2.1 --- a/tools/make_freebusy.py Tue Jan 31 16:06:40 2017 +0100
2.2 +++ b/tools/make_freebusy.py Tue Jan 31 16:18:55 2017 +0100
2.3 @@ -5,7 +5,7 @@
2.4 availability schedule or the schedule of another user (using details provided
2.5 when scheduling events with that user).
2.6
2.7 -Copyright (C) 2014, 2015, 2016 Paul Boddie <paul@boddie.org.uk>
2.8 +Copyright (C) 2014, 2015, 2016, 2017 Paul Boddie <paul@boddie.org.uk>
2.9
2.10 This program is free software; you can redistribute it and/or modify it under
2.11 the terms of the GNU General Public License as published by the Free Software
2.12 @@ -34,7 +34,7 @@
2.13 sys.path.append(parent)
2.14
2.15 from codecs import getwriter
2.16 -from imiptools import config
2.17 +from imiptools.config import settings
2.18 from imiptools.client import Client
2.19 from imiptools.data import get_window_end, Object
2.20 from imiptools.dates import get_default_timezone, to_utc_datetime
2.21 @@ -266,7 +266,7 @@
2.22
2.23 getvalue = lambda value, default=None: value and value[0] or default
2.24
2.25 - store_type = getvalue(store_type, config.STORE_TYPE)
2.26 + store_type = getvalue(store_type, settings["STORE_TYPE"])
2.27 store_dir = getvalue(store_dir)
2.28 publishing_dir = getvalue(publishing_dir)
2.29 journal_dir = getvalue(journal_dir)
3.1 --- a/tools/set_delegates.py Tue Jan 31 16:06:40 2017 +0100
3.2 +++ b/tools/set_delegates.py Tue Jan 31 16:18:55 2017 +0100
3.3 @@ -3,7 +3,7 @@
3.4 """
3.5 Set delegates for a particular quota.
3.6
3.7 -Copyright (C) 2016 Paul Boddie <paul@boddie.org.uk>
3.8 +Copyright (C) 2016, 2017 Paul Boddie <paul@boddie.org.uk>
3.9
3.10 This program is free software; you can redistribute it and/or modify it under
3.11 the terms of the GNU General Public License as published by the Free Software
3.12 @@ -32,7 +32,7 @@
3.13 if split(parent)[1] == "imip-agent":
3.14 sys.path.append(parent)
3.15
3.16 -from imiptools import config
3.17 +from imiptools.config import settings
3.18 from imiptools.stores import get_journal
3.19 from imiptools.text import get_table_from_stream
3.20
3.21 @@ -76,7 +76,7 @@
3.22
3.23 getvalue = lambda value, default=None: value and value[0] or default
3.24
3.25 - store_type = getvalue(store_type, config.STORE_TYPE)
3.26 + store_type = getvalue(store_type, settings["STORE_TYPE"])
3.27 journal_dir = getvalue(journal_dir)
3.28
3.29 # Obtain store-related objects.
4.1 --- a/tools/set_quota_groups.py Tue Jan 31 16:06:40 2017 +0100
4.2 +++ b/tools/set_quota_groups.py Tue Jan 31 16:18:55 2017 +0100
4.3 @@ -3,7 +3,7 @@
4.4 """
4.5 Set a mapping of users to groups for a quota.
4.6
4.7 -Copyright (C) 2016 Paul Boddie <paul@boddie.org.uk>
4.8 +Copyright (C) 2016, 2017 Paul Boddie <paul@boddie.org.uk>
4.9
4.10 This program is free software; you can redistribute it and/or modify it under
4.11 the terms of the GNU General Public License as published by the Free Software
4.12 @@ -32,7 +32,7 @@
4.13 if split(parent)[1] == "imip-agent":
4.14 sys.path.append(parent)
4.15
4.16 -from imiptools import config
4.17 +from imiptools.config import settings
4.18 from imiptools.stores import get_journal
4.19 from imiptools.text import get_table_from_stream
4.20
4.21 @@ -87,7 +87,7 @@
4.22
4.23 getvalue = lambda value, default=None: value and value[0] or default
4.24
4.25 - store_type = getvalue(store_type, config.STORE_TYPE)
4.26 + store_type = getvalue(store_type, settings["STORE_TYPE"])
4.27 journal_dir = getvalue(journal_dir)
4.28
4.29 # Obtain store-related objects.
5.1 --- a/tools/set_quota_limits.py Tue Jan 31 16:06:40 2017 +0100
5.2 +++ b/tools/set_quota_limits.py Tue Jan 31 16:18:55 2017 +0100
5.3 @@ -3,7 +3,7 @@
5.4 """
5.5 Set quota limits for a collection of user groups.
5.6
5.7 -Copyright (C) 2016 Paul Boddie <paul@boddie.org.uk>
5.8 +Copyright (C) 2016, 2017 Paul Boddie <paul@boddie.org.uk>
5.9
5.10 This program is free software; you can redistribute it and/or modify it under
5.11 the terms of the GNU General Public License as published by the Free Software
5.12 @@ -32,7 +32,7 @@
5.13 if split(parent)[1] == "imip-agent":
5.14 sys.path.append(parent)
5.15
5.16 -from imiptools import config
5.17 +from imiptools.config import settings
5.18 from imiptools.stores import get_journal
5.19 from imiptools.text import get_table_from_stream
5.20
5.21 @@ -87,7 +87,7 @@
5.22
5.23 getvalue = lambda value, default=None: value and value[0] or default
5.24
5.25 - store_type = getvalue(store_type, config.STORE_TYPE)
5.26 + store_type = getvalue(store_type, settings["STORE_TYPE"])
5.27 journal_dir = getvalue(journal_dir)
5.28
5.29 # Obtain store-related objects.
6.1 --- a/tools/update_quotas.py Tue Jan 31 16:06:40 2017 +0100
6.2 +++ b/tools/update_quotas.py Tue Jan 31 16:18:55 2017 +0100
6.3 @@ -3,7 +3,7 @@
6.4 """
6.5 Remove expired events from quota journals.
6.6
6.7 -Copyright (C) 2014, 2015, 2016 Paul Boddie <paul@boddie.org.uk>
6.8 +Copyright (C) 2014, 2015, 2016, 2017 Paul Boddie <paul@boddie.org.uk>
6.9
6.10 This program is free software; you can redistribute it and/or modify it under
6.11 the terms of the GNU General Public License as published by the Free Software
6.12 @@ -32,7 +32,7 @@
6.13 sys.path.append(parent)
6.14
6.15 from codecs import getwriter
6.16 -from imiptools import config
6.17 +from imiptools.config import settings
6.18 from imiptools.dates import get_datetime, get_default_timezone, get_time, \
6.19 to_utc_datetime
6.20 from imiptools.stores import get_journal
6.21 @@ -160,7 +160,7 @@
6.22
6.23 getvalue = lambda value, default=None: value and value[0] or default
6.24
6.25 - store_type = getvalue(store_type, config.STORE_TYPE)
6.26 + store_type = getvalue(store_type, settings["STORE_TYPE"])
6.27 journal_dir = getvalue(journal_dir)
6.28 expiry = getvalue(expiry)
6.29