81 +# server = AuthenticatingServerProxy(
82 +# self.args.SERVER, auth_backend=KeyringAuthBackend())
While this looks okay I think parsing the URL would be saner for bogus URLs.
22 +def normalize_xmlrpc_url(uri):
23 + if '://' not in uri:
24 + uri = 'http://' + uri
25 + if not uri.endswith('/'):
26 + uri += '/'
27 + if not uri.endswith('/RPC2/'):
28 + uri += 'RPC2/'
29 + return uri
We can probably remove that line
81 +# server = AuthenticatingS erverProxy( KeyringAuthBack end())
82 +# self.args.SERVER, auth_backend=
While this looks okay I think parsing the URL would be saner for bogus URLs. xmlrpc_ url(uri) : ' + uri '/RPC2/ '):
22 +def normalize_
23 + if '://' not in uri:
24 + uri = 'http://
25 + if not uri.endswith('/'):
26 + uri += '/'
27 + if not uri.endswith(
28 + uri += 'RPC2/'
29 + return uri
Instead of checking this manually you can use MutuallyExclusi veGroup from argparse. It makes --help document this and allows you to express the same limitation without client-side code. See: http:// argparse. googlecode. com/svn/ trunk/doc/ other-methods. html#mutual- exclusion
56 + if parsed_ host.password:
57 + raise LavaCommandError(
58 + "Token specified in url but --token-file also passed.");