Skip to content
Snippets Groups Projects
Commit f9be0a30 authored by Klaas Kliffen's avatar Klaas Kliffen :satellite:
Browse files

Merge branch 'yg-typofix' into 'master'

Fix small typo in the client code

See merge request !14
parents 6d426c4f c85ff114
No related branches found
No related tags found
1 merge request!14Fix small typo in the client code
...@@ -91,7 +91,7 @@ class Rucio(BaseConnector): ...@@ -91,7 +91,7 @@ class Rucio(BaseConnector):
active_rules = set() active_rules = set()
active_dids = set() active_dids = set()
lifetime = ( lifetime = (
os.environ["RUCIO_REPLICATION_RULE_LIFETIME_DAYS"] * 24 * 60 * 60 int(os.environ["RUCIO_REPLICATION_RULE_LIFETIME_DAYS"]) * 24 * 60 * 60
) # in seconds ) # in seconds
local_RSE = os.environ["RUCIO_DESTINATION_RSE"] local_RSE = os.environ["RUCIO_DESTINATION_RSE"]
local_basepath = os.environ["RUCIO_RSE_MOUNT_PATH"] local_basepath = os.environ["RUCIO_RSE_MOUNT_PATH"]
......
...@@ -17,7 +17,7 @@ logger = logging.getLogger(__name__) ...@@ -17,7 +17,7 @@ logger = logging.getLogger(__name__)
def is_valid_token(token: str) -> bool: def is_valid_token(token: str) -> bool:
"""Check that the given token has not expired""" """Check that the given token has not expired"""
try: try:
selfdata = token.split(".")[1] data = token.split(".")[1]
padded = data + "=" * divmod(len(data), 4)[1] padded = data + "=" * divmod(len(data), 4)[1]
payload = json.loads(base64.urlsafe_b64decode(padded)) payload = json.loads(base64.urlsafe_b64decode(padded))
return payload["exp"] > int(time.time()) + 10 return payload["exp"] > int(time.time()) + 10
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment