From 503658bf4ed09a56446275400ba32f2c8e4dba01 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Wed, 25 Aug 2021 12:04:13 +0100 Subject: [PATCH] companion: Correct Session.profile(query_time) default --- companion.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/companion.py b/companion.py index a49a1a38..8d78b619 100644 --- a/companion.py +++ b/companion.py @@ -996,7 +996,7 @@ class Session(object): def profile( self, - query_time: int = int(time.time()), + query_time: int = 0, tk_response_event: Optional[str] = None, retrying: bool = False, play_sound: bool = False, auto_update: bool = False ) -> None: @@ -1009,6 +1009,9 @@ class Session(object): :param play_sound: Whether the app should play a sound on error. :param auto_update: Whether this request was triggered automatically. """ + if query_time == 0: + query_time = int(time.time()) + self.query( self.FRONTIER_CAPI_PATH_PROFILE, query_time=query_time, tk_response_event=tk_response_event, retrying=retrying,