# HG changeset patch # User Paul Boddie # Date 1461249267 -7200 # Node ID 64303953c839f8e98b3ee40c757b61032b399ff1 # Parent 8f94a04d9900c2686c16a2e8fae1d3ed6bc300eb Fixed the tools to properly handle being run in the distribution. Improved the help text for the free/busy update/generation script. diff -r 8f94a04d9900 -r 64303953c839 tools/make_freebusy.py --- a/tools/make_freebusy.py Thu Apr 21 00:58:18 2016 +0200 +++ b/tools/make_freebusy.py Thu Apr 21 16:34:27 2016 +0200 @@ -21,7 +21,7 @@ this program. If not, see . """ -from os.path import split +from os.path import abspath, split import sys # Find the modules. @@ -29,7 +29,7 @@ try: import imiptools except ImportError: - parent = split(split(__file__)[0])[0] + parent = abspath(split(split(__file__)[0])[0]) if split(parent)[1] == "imip-agent": sys.path.append(parent) @@ -182,13 +182,18 @@ user = participants[0] except IndexError: print >>sys.stderr, """\ -Usage: %s [ ] +Usage: %s [ ] [ ] Need a user and an optional participant (if different from the user), along with the -s option if updating the store and the published details. -Specify -n to include objects with PARTSTAT of NEEDS-ACTION. -Specify -r to inspect all objects, not just those expected to provide details. -Specify -v for additional messages on standard error. + +Specific options: + +-s Update the store and published details (write details to standard output + otherwise) +-n Include objects with PARTSTAT of NEEDS-ACTION +-r Inspect all objects, not just those expected to provide details +-v Show additional messages on standard error General options: @@ -218,7 +223,7 @@ journal_dir = getvalue(journal_dir) preferences_dir = getvalue(preferences_dir) - # Obtain store-related objects. + # Obtain store-related objects or delegate this to the Client initialiser. store = get_store(store_type, store_dir) publisher = get_publisher(publishing_dir) diff -r 8f94a04d9900 -r 64303953c839 tools/set_quota_limit.py --- a/tools/set_quota_limit.py Thu Apr 21 00:58:18 2016 +0200 +++ b/tools/set_quota_limit.py Thu Apr 21 16:34:27 2016 +0200 @@ -19,7 +19,7 @@ this program. If not, see . """ -from os.path import split +from os.path import abspath, split import sys # Find the modules. @@ -27,7 +27,7 @@ try: import imiptools except ImportError: - parent = split(split(__file__)[0])[0] + parent = abspath(split(split(__file__)[0])[0]) if split(parent)[1] == "imip-agent": sys.path.append(parent) diff -r 8f94a04d9900 -r 64303953c839 tools/update_quotas.py --- a/tools/update_quotas.py Thu Apr 21 00:58:18 2016 +0200 +++ b/tools/update_quotas.py Thu Apr 21 16:34:27 2016 +0200 @@ -19,7 +19,7 @@ this program. If not, see . """ -from os.path import split +from os.path import abspath, split import sys # Find the modules. @@ -27,7 +27,7 @@ try: import imiptools except ImportError: - parent = split(split(__file__)[0])[0] + parent = abspath(split(split(__file__)[0])[0]) if split(parent)[1] == "imip-agent": sys.path.append(parent)