Skip to content

Commit be33ca2

Browse files
committed
refactoring the module names
1 parent 83f3f6b commit be33ca2

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed
File renamed without changes.

api/boa_client.py renamed to boaapi/boa_client.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import xmlrpc.client
22
import traceback
3-
import util
3+
from boaapi.util import parse_job
4+
from boaapi.util import CookiesTransport
45

56
BOA_PROXY = "http://boa.cs.iastate.edu/boa/?q=boa/api"
67

@@ -20,7 +21,7 @@ class BoaClient(object):
2021

2122
def __init__(self):
2223
"""Create a new Boa API client, using the standard domain/path."""
23-
self.trans = util.CookiesTransport()
24+
self.trans = CookiesTransport()
2425
self.__logged_in = False
2526
self.server = xmlrpc.client.ServerProxy(BOA_PROXY, transport=self.trans)
2627

@@ -171,7 +172,7 @@ def query(self, query, dataset=None):
171172
try:
172173
id = 0 if dataset is None else dataset.get_id()
173174
job = self.server.boa.submit(query, self.datasets()[id]['id'])
174-
return util.parse_job(self, job)
175+
return parse_job(self, job)
175176
except xmlrpc.client.Fault as e:
176177
raise BoaException(e).with_traceback(e.__traceback__)
177178

@@ -189,7 +190,7 @@ def get_job(self, id):
189190
"""
190191
self.ensure_logged_in()
191192
try:
192-
return util.parse_job(self, self.server.boa.job(id))
193+
return parse_job(self, self.server.boa.job(id))
193194
except xmlrpc.client.Fault as e:
194195
raise BoaException(e).with_traceback(e.__traceback__)
195196

@@ -215,7 +216,7 @@ def job_list(self, pub_only=False, offset=0, length=1000):
215216
newDict = []
216217
if(len(list) > 0):
217218
for i in list:
218-
newDict.append(util.parse_job(self, i))
219+
newDict.append(parse_job(self, i))
219220
return newDict
220221
except xmlrpc.client.Fault as e:
221222
raise BoaException(e).with_traceback(e.__traceback__)
@@ -375,4 +376,4 @@ def output(self, job):
375376
return "Job is currently running"
376377
return self.server.job.output(job.id)
377378
except xmlrpc.client.Fault as e:
378-
raise BoaException(e).with_traceback(e.__traceback__)
379+
raise BoaException(e).with_traceback(e.__traceback__)
File renamed without changes.

api/util.py renamed to boaapi/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import xmlrpc
2-
from job_handle import JobHandle
2+
from boaapi.job_handle import JobHandle
33

44
class CookiesTransport(xmlrpc.client.Transport):
55
"""A Transport subclass that retains cookies over its lifetime."""

0 commit comments

Comments
 (0)