Skip to content

Commit ba1d03b

Browse files
authored
credentials: set expiration using object.__setattr__() (#1516)
Signed-off-by: Bala.FA <[email protected]>
1 parent 7c34d3c commit ba1d03b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

minio/credentials/credentials.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ def __post_init__(self):
4141
raise ValueError("Secret key must not be empty")
4242

4343
if self.expiration and self.expiration.tzinfo:
44-
self.expiration = (
45-
self.expiration.astimezone(timezone.utc).replace(tzinfo=None)
44+
object.__setattr__(
45+
self, "expiration",
46+
self.expiration.astimezone(timezone.utc).replace(tzinfo=None),
4647
)
4748

4849
def is_expired(self) -> bool:

0 commit comments

Comments
 (0)