From b4b9ae5d68fd514e72b946a832f1e1d06506115d Mon Sep 17 00:00:00 2001 From: Jason Ding Date: Thu, 10 Nov 2022 01:16:06 +0000 Subject: [PATCH] fix client id issue --- skyplane/api/usage/client.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/skyplane/api/usage/client.py b/skyplane/api/usage/client.py index b68a70acc..6989fba5c 100644 --- a/skyplane/api/usage/client.py +++ b/skyplane/api/usage/client.py @@ -92,8 +92,11 @@ class UsageClient: and report usage stats. """ - def __init__(self, client_id: Optional[str] = get_clientid()): - self.client_id = client_id + def __init__(self, client_id: Optional[str] = None): + if client_id: + self.client_id = client_id + else: + self.client_id = get_clientid() self.session_id = f"{datetime.datetime.now().strftime('%Y%m%d_%H%M%S')}-{uuid.uuid4().hex[:8]}" @classmethod