From b57db447463ce686cd5c65a7d87683b928d92a91 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 15 Jan 2008 23:26:10 +0000 Subject: [PATCH] updated to match opensrf changes, more move away from prefixed functions. git-svn-id: svn://svn.open-ils.org/ILS/trunk@8387 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/python/oils/system.py | 15 ++++++++------- Open-ILS/src/python/oils/utils/utils.py | 6 +++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Open-ILS/src/python/oils/system.py b/Open-ILS/src/python/oils/system.py index 5124f05866..e4b0a3dfc2 100644 --- a/Open-ILS/src/python/oils/system.py +++ b/Open-ILS/src/python/oils/system.py @@ -14,13 +14,14 @@ # ----------------------------------------------------------------------- import osrf.log -from osrf.system import connect +import osrf.system from oils.utils.idl import IDLParser from oils.utils.csedit import oilsLoadCSEditor -def oilsConnect(config, configContext): - """Connects to the opensrf network, parses the IDL file, and loads the CSEditor""" - osrf.log.log_info("oilsConnect(): connecting with config %s" % config) - connect(config, configContext) - IDLParser.parse() - oilsLoadCSEditor() +class System(object): + @staticmethod + def connect(**kwargs): + """Connects to the opensrf network, parses the IDL file, and loads the CSEditor""" + osrf.system.System.connect(**kwargs) + IDLParser.parse() + oilsLoadCSEditor() diff --git a/Open-ILS/src/python/oils/utils/utils.py b/Open-ILS/src/python/oils/utils/utils.py index 47c939ece6..1941a85759 100644 --- a/Open-ILS/src/python/oils/utils/utils.py +++ b/Open-ILS/src/python/oils/utils/utils.py @@ -14,7 +14,7 @@ # ----------------------------------------------------------------------- import re, md5 -from osrf.ses import AtomicRequest +import osrf.ses from osrf.log import * @@ -61,14 +61,14 @@ def login(username, password, type=None, workstation=None): log_info("attempting login with user " + username) - seed = AtomicRequest( + seed = osrf.ses.ClientSession.atomic_request( 'open-ils.auth', 'open-ils.auth.authenticate.init', username) # generate the hashed password password = md5sum(seed + md5sum(password)) - return AtomicRequest( + return osrf.ses.ClientSession.atomic_request( 'open-ils.auth', 'open-ils.auth.authenticate.complete', { 'workstation' : workstation, -- 2.11.0