From 6b0564045261d55a2fa5865b55f9918d09304206 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 29 Sep 2018 10:19:32 +0200 Subject: [PATCH 1/2] Glances IO Errorno 22 - Invalid argument #1326 --- NEWS | 7 +++++++ glances/standalone.py | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 36935cb826..73f982dfeb 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,13 @@ Glances Version 3 ============================================================================== +Version 3.0.2 +============= + +Bug corrected: + + * Glances IO Errorno 22 - Invalid argument #1326 + Version 3.0.1 ============= diff --git a/glances/standalone.py b/glances/standalone.py index 8399c6fddb..7feab30063 100644 --- a/glances/standalone.py +++ b/glances/standalone.py @@ -119,17 +119,20 @@ def __serve_forever(self): self.stats.export(self.stats) logger.debug('Stats exported in {} seconds'.format(counter_export.get())) + # Patch for issue1326 to avoid < 0 refresh + adapted_refresh = self.refresh_time - counter.get() + adapted_refresh = adapted_refresh if adapted_refresh > 0 else 0 + # Display stats # and wait refresh_time - counter if not self.quiet: # The update function return True if an exit key 'q' or 'ESC' # has been pressed. - ret = not self.screen.update(self.stats, - duration=self.refresh_time - counter.get()) + ret = not self.screen.update(self.stats, duration=adapted_refresh) else: # Nothing is displayed # Break should be done via a signal (CTRL-C) - time.sleep(self.refresh_time - counter.get()) + time.sleep(adapted_refresh) ret = True return ret From 6e3424b6e021ecdbb513219b3cd4c956040f6da6 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 29 Sep 2018 10:33:45 +0200 Subject: [PATCH 2/2] Glances 3.0.2 (Hotfix version) --- docs/man/glances.1 | 2 +- glances/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/man/glances.1 b/docs/man/glances.1 index 00bd1552aa..6cd003c1c4 100644 --- a/docs/man/glances.1 +++ b/docs/man/glances.1 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "GLANCES" "1" "Sep 04, 2018" "3.0.1" "Glances" +.TH "GLANCES" "1" "Sep 29, 2018" "3.0.2" "Glances" .SH NAME glances \- An eye on your system . diff --git a/glances/__init__.py b/glances/__init__.py index e5e62a945f..93aa04f4ca 100644 --- a/glances/__init__.py +++ b/glances/__init__.py @@ -27,7 +27,7 @@ import sys # Global name -__version__ = '3.0.1' +__version__ = '3.0.2' __author__ = 'Nicolas Hennion ' __license__ = 'LGPLv3'