diff --git a/esap_client/connectors/rucio.py b/esap_client/connectors/rucio.py index dd7a90366ea93ba9221890544664b6f37192d7c1..adfeaed0e924a562ec3201e27aefc85a49eea494 100644 --- a/esap_client/connectors/rucio.py +++ b/esap_client/connectors/rucio.py @@ -91,7 +91,7 @@ class Rucio(BaseConnector): active_rules = set() active_dids = set() lifetime = ( - os.environ["RUCIO_REPLICATION_RULE_LIFETIME_DAYS"] * 24 * 60 * 60 + int(os.environ["RUCIO_REPLICATION_RULE_LIFETIME_DAYS"]) * 24 * 60 * 60 ) # in seconds local_RSE = os.environ["RUCIO_DESTINATION_RSE"] local_basepath = os.environ["RUCIO_RSE_MOUNT_PATH"] diff --git a/esap_client/shopping_client.py b/esap_client/shopping_client.py index 62a09b6576c26c55d4f8818a7cadd3d65a555640..b633749770f673f2c0dec36a79cc0ea444b7a0fa 100644 --- a/esap_client/shopping_client.py +++ b/esap_client/shopping_client.py @@ -17,7 +17,7 @@ logger = logging.getLogger(__name__) def is_valid_token(token: str) -> bool: """Check that the given token has not expired""" try: - selfdata = token.split(".")[1] + data = token.split(".")[1] padded = data + "=" * divmod(len(data), 4)[1] payload = json.loads(base64.urlsafe_b64decode(padded)) return payload["exp"] > int(time.time()) + 10