aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBogdano Arendartchuk <bogdano@mandriva.org>2007-05-09 18:36:47 +0000
committerBogdano Arendartchuk <bogdano@mandriva.org>2007-05-09 18:36:47 +0000
commit31becac5f0ae95ec80b31e22d1aa868be037caba (patch)
tree7d102c2adc8127517a1f82790367c5f6bf3fee9a
parentee3e2cf64501862e42cfff18a5086779b2f69c84 (diff)
downloadmgarepo-31becac5f0ae95ec80b31e22d1aa868be037caba.tar
mgarepo-31becac5f0ae95ec80b31e22d1aa868be037caba.tar.gz
mgarepo-31becac5f0ae95ec80b31e22d1aa868be037caba.tar.bz2
mgarepo-31becac5f0ae95ec80b31e22d1aa868be037caba.tar.xz
mgarepo-31becac5f0ae95ec80b31e22d1aa868be037caba.zip
Pulled small bug fixes from V1_6_X to be released in 1.6.17.1.
Merged revisions r219559 and r219560.
-rw-r--r--RepSys/plugins/__init__.py8
-rwxr-xr-xrepsys6
2 files changed, 9 insertions, 5 deletions
diff --git a/RepSys/plugins/__init__.py b/RepSys/plugins/__init__.py
index 8bf4521..e4f4e08 100644
--- a/RepSys/plugins/__init__.py
+++ b/RepSys/plugins/__init__.py
@@ -8,13 +8,13 @@ def load():
for entry in os.listdir(pluginsdir):
if entry != "__init__.py" and entry.endswith(".py"):
name = entry[:-3]
- loaded[name] = __import__("RepSys.plugins."+name,
- fromlist=[name])
+ loaded[name] = __import__("RepSys.plugins."+name, {}, {},
+ [name])
elif os.path.isdir(entry):
initfile = os.path.join(entry, "__init__.py")
if os.path.isfile(initfile):
- loaded[entry] = __import__("RepSys.plugins."+entry,
- fromlist=[entry])
+ loaded[entry] = __import__("RepSys.plugins."+entry, {}, {},
+ [entry])
def list():
return loaded.keys()
diff --git a/repsys b/repsys
index c5f4b09..8180bfe 100755
--- a/repsys
+++ b/repsys
@@ -69,10 +69,14 @@ def dispatch_command(command, argv, debug=0):
traceback.print_exc()
sys.exit(1)
raise Error, "invalid command '%s'" % command
- plugins.load()
command_module.main()
if __name__ == "__main__":
+ try:
+ plugins.load()
+ except Error, e:
+ sys.stderr.write("plugin initialization error: %s\n" % e)
+ sys.exit(1)
do_command(parse_options, dispatch_command)
# vim:et:ts=4:sw=4