mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-28 14:12:21 +03:00
Glances IO Errorno 22 - Invalid argument #1326
This commit is contained in:
parent
9b29f15130
commit
6b05640452
7
NEWS
7
NEWS
@ -2,6 +2,13 @@
|
|||||||
Glances Version 3
|
Glances Version 3
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
|
Version 3.0.2
|
||||||
|
=============
|
||||||
|
|
||||||
|
Bug corrected:
|
||||||
|
|
||||||
|
* Glances IO Errorno 22 - Invalid argument #1326
|
||||||
|
|
||||||
Version 3.0.1
|
Version 3.0.1
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
@ -119,17 +119,20 @@ class GlancesStandalone(object):
|
|||||||
self.stats.export(self.stats)
|
self.stats.export(self.stats)
|
||||||
logger.debug('Stats exported in {} seconds'.format(counter_export.get()))
|
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
|
# Display stats
|
||||||
# and wait refresh_time - counter
|
# and wait refresh_time - counter
|
||||||
if not self.quiet:
|
if not self.quiet:
|
||||||
# The update function return True if an exit key 'q' or 'ESC'
|
# The update function return True if an exit key 'q' or 'ESC'
|
||||||
# has been pressed.
|
# has been pressed.
|
||||||
ret = not self.screen.update(self.stats,
|
ret = not self.screen.update(self.stats, duration=adapted_refresh)
|
||||||
duration=self.refresh_time - counter.get())
|
|
||||||
else:
|
else:
|
||||||
# Nothing is displayed
|
# Nothing is displayed
|
||||||
# Break should be done via a signal (CTRL-C)
|
# Break should be done via a signal (CTRL-C)
|
||||||
time.sleep(self.refresh_time - counter.get())
|
time.sleep(adapted_refresh)
|
||||||
ret = True
|
ret = True
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
Loading…
Reference in New Issue
Block a user