mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-02 19:26:44 +00:00
cleanup / review
This commit is contained in:
parent
3b3b95838e
commit
d34c32cc50
@ -94,7 +94,7 @@ def load_grid_manager(config_path, config_location):
|
|||||||
|
|
||||||
storage_servers = dict()
|
storage_servers = dict()
|
||||||
for name, srv_config in config.get(u'storage_servers', {}).items():
|
for name, srv_config in config.get(u'storage_servers', {}).items():
|
||||||
if not 'public_key' in srv_config:
|
if 'public_key' not in srv_config:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"No 'public_key' for storage server '{}'".format(name)
|
"No 'public_key' for storage server '{}'".format(name)
|
||||||
)
|
)
|
||||||
@ -130,7 +130,7 @@ class _GridManager(object):
|
|||||||
srv = self._storage_servers[name]
|
srv = self._storage_servers[name]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
raise KeyError(
|
raise KeyError(
|
||||||
u"No storage server named '{}'".format(name)
|
"No storage server named '{}'".format(name)
|
||||||
)
|
)
|
||||||
expiration = datetime.utcnow() + timedelta(seconds=expiry_seconds)
|
expiration = datetime.utcnow() + timedelta(seconds=expiry_seconds)
|
||||||
epoch_offset = (expiration - datetime(1970, 1, 1)).total_seconds()
|
epoch_offset = (expiration - datetime(1970, 1, 1)).total_seconds()
|
||||||
|
Loading…
Reference in New Issue
Block a user