Corect issue when displaying multiple GPU

This commit is contained in:
Nicolargo 2016-12-19 11:44:33 +01:00
commit 67d9b96d86
2 changed files with 1 additions and 5 deletions

View File

@ -51,10 +51,6 @@ except locale.Error:
print("Warning: Unable to set locale. Expect encoding problems.")
# Check Python version
if sys.version_info[:2] == (2, 6):
import warnings
warnings.warn('Python 2.6 support is dropped. Please switch to at '
'least Python 2.7/3.3+ or downgrade to Glances 2.6.2.')
if sys.version_info < (2, 7) or (3, 0) <= sys.version_info < (3, 3):
print('Glances requires at least Python 2.7 or 3.3 to run.')
sys.exit(1)

View File

@ -154,7 +154,7 @@ class Plugin(GlancesPlugin):
if gpu_stats['mem'] is None:
msg = '{:>8}'.format('N/A')
else:
msg = '{:>7d%}'.format(int(gpu_stats['mem']))
msg = '{:>7d}%'.format(int(gpu_stats['mem']))
ret.append(self.curse_add_line(
msg, self.get_views(item=gpu_stats[self.get_key()],
key='mem',