From aee77a23af61ff6b625f5c5cf9e80d0d47cc4476 Mon Sep 17 00:00:00 2001 From: Anton Emelyanov Date: Tue, 20 Jul 2021 19:24:49 +0300 Subject: [PATCH] Simplify spinner_pos calculation a little (#1111) --- httpie/downloads.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/httpie/downloads.py b/httpie/downloads.py index 074ea41b..bd53684d 100644 --- a/httpie/downloads.py +++ b/httpie/downloads.py @@ -451,9 +451,7 @@ class ProgressReporterThread(threading.Thread): ) self.output.flush() - self._spinner_pos = (self._spinner_pos + 1 - if self._spinner_pos + 1 != len(SPINNER) - else 0) + self._spinner_pos = (self._spinner_pos + 1) % len(SPINNER) def sum_up(self): actually_downloaded = (