Opened 12 years ago

Closed 12 years ago

#68 closed (fixed)

mandatory GMOCClient.serviceURL parameter is not required by __init__()

Reported by: chaos@bbn.com Owned by: somebody
Priority: major Milestone: 2012-09-04 client release
Component: Clients Version:
Keywords: v0.6.0 Cc:
Dependencies:

Description

The code:

data = gmoc.GMOCClient()
...
data.store(pop)

fails with:

Traceback (most recent call last):
  File "./report_foam_relations", line 337, in <module>
    data.store(pop)
  File "/home/chaos/gmoc.py", line 1762, in store
    wsEndpoint = self.serviceURL + '/xchange/webservice.pl'
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Either:

  1. The code should provide a default value for serviceURL (e.g. the production URL)
  2. The GMOCClient init should fail with an error when no URL is provided

Change History (4)

comment:1 Changed 12 years ago by chaos@bbn.com

Keywords: v0.5.3 added; v0.5.0 removed

comment:2 Changed 12 years ago by sedwards@bbn.com

Keywords: v0.6.0 added; v0.5.3 removed

comment:3 Changed 12 years ago by sedwards@bbn.com

Kevin will have validator check for a string or a url.

comment:4 Changed 12 years ago by sedwards@bbn.com

Resolution: fixed
Status: newclosed

Validator now says:

ValueError: serviceURL must be a valid URL  

When I put serviceURL in, it says:

ValueError: username must be a valid string

When I put username in, it says:

ValueError: password must be a valid string

When I put password in, it works.

So this looks fixed. Closing.

Note: See TracTickets for help on using tickets.