aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/vk/tracking/sessions.py
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-06-23 17:54:45 +0200
committerEgor Tensin <egor@tensin.name>2026-06-23 17:59:46 +0200
commit82556a81b67368b1f940c85d97d1ea2d97870f13 (patch)
treec781341edd5117a444d1cf6c9492a944a53d0b72 /vk/tracking/sessions.py
parentdocs: remove stupid "See also" sections (diff)
downloadvk-scripts-82556a81b67368b1f940c85d97d1ea2d97870f13.tar.gz
vk-scripts-82556a81b67368b1f940c85d97d1ea2d97870f13.zip
fix Pylint warnings
Diffstat (limited to 'vk/tracking/sessions.py')
-rw-r--r--vk/tracking/sessions.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/vk/tracking/sessions.py b/vk/tracking/sessions.py
index 6c4e787..5d545f1 100644
--- a/vk/tracking/sessions.py
+++ b/vk/tracking/sessions.py
@@ -57,13 +57,11 @@ class OnlineSessionEnumerator(MutableMapping):
if self._time_from is not None:
if ended_at < self._time_from:
return None
- if started_at < self._time_from:
- started_at = self._time_from
+ started_at = max(started_at, self._time_from)
if self._time_to is not None:
if started_at > self._time_to:
return None
- if ended_at > self._time_to:
- ended_at = self._time_to
+ ended_at = min(ended_at, self._time_to)
return user, started_at, ended_at
def read_database(self, db_reader):