From: dbs Date: Tue, 6 Nov 2007 19:33:49 +0000 (+0000) Subject: Enable srfsh.py to load with the standard .srfsh.xml (no plugins) X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b48992ea6f0dd765cafbb38fdd798f1bb1a2d600;p=opensrf%2Fbjwebb.git Enable srfsh.py to load with the standard .srfsh.xml (no plugins) git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1123 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/python/srfsh.py b/src/python/srfsh.py index 3c9cff9..6528f1b 100755 --- a/src/python/srfsh.py +++ b/src/python/srfsh.py @@ -1,4 +1,5 @@ #!/usr/bin/python2.4 +# vim:et:ts=4 import os, sys, time, readline, atexit, re from string import * from osrf.system import osrfConnect @@ -99,7 +100,7 @@ def handle_help(): # ------------------------------------------------------------------- -# performs an opesnrf request +# performs an opensrf request # ------------------------------------------------------------------- def handle_request(parts): service = parts.pop(0) @@ -221,7 +222,14 @@ def do_connect(): def load_plugins(): # Load the user defined external plugins # XXX Make this a real module interface, with tab-complete words, commands, etc. - plugins = osrfConfigValue('plugins') + try: + plugins = osrfConfigValue('plugins') + + except: + # XXX standard srfsh.xml does not yet define element + print_red("No plugins defined in /srfsh/plugins/plugin\n") + return + plugins = osrfConfigValue('plugins.plugin') if not isinstance(plugins, list): plugins = [plugins]