[Opensrf-commits] r1123 - trunk/src/python
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Nov 6 14:49:24 EST 2007
Author: dbs
Date: 2007-11-06 14:33:49 -0500 (Tue, 06 Nov 2007)
New Revision: 1123
Modified:
trunk/src/python/srfsh.py
Log:
Enable srfsh.py to load with the standard .srfsh.xml (no plugins)
Modified: trunk/src/python/srfsh.py
===================================================================
--- trunk/src/python/srfsh.py 2007-11-06 14:40:08 UTC (rev 1122)
+++ trunk/src/python/srfsh.py 2007-11-06 19:33:49 UTC (rev 1123)
@@ -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 @@
# -------------------------------------------------------------------
-# performs an opesnrf request
+# performs an opensrf request
# -------------------------------------------------------------------
def handle_request(parts):
service = parts.pop(0)
@@ -221,7 +222,14 @@
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 <plugins> element
+ print_red("No plugins defined in /srfsh/plugins/plugin\n")
+ return
+
plugins = osrfConfigValue('plugins.plugin')
if not isinstance(plugins, list):
plugins = [plugins]
More information about the opensrf-commits
mailing list