return getattr(self, data_name)
def setter(self, hex_str):
if not arvados.util.is_hex(hex_str, length):
- raise ValueError("{} must be a {}-digit hex string: {}".
+ raise ValueError("{} is not a {}-digit hex string: {}".
format(name, length, hex_str))
setattr(self, data_name, hex_str)
return property(getter, setter)
'uuid': 'proxy',
'_service_root': proxy,
}]
- self._writable_services = [{
- 'uuid': 'proxy',
- '_service_root': proxy,
- }]
+ self._writable_services = self._keep_services
self.using_proxy = True
self._static_services_list = True
else:
# for this locator, and return their service_roots (base URIs)
# in that order.
use_services = self._keep_services
- if (need_writable == True):
+ if need_writable:
use_services = self._writable_services
sorted_roots.extend([
svc['_service_root'] for svc in sorted(
if isinstance(data, unicode):
data = data.encode("ascii")
elif not isinstance(data, str):
- raise arvados.errors.ArgumentError("Argument 'data' to KeepClient.put must be type 'str'")
+ raise arvados.errors.ArgumentError("Argument 'data' to KeepClient.put is not type 'str'")
data_hash = hashlib.md5(data).hexdigest()
if copies < 1: