class AmpsList method _build_amps_list() Windows fail (glances/amps_list.py) #1689

This commit is contained in:
nicolargo 2020-07-20 10:52:54 +02:00
parent ea838f0e61
commit 219c4de08f
1 changed files with 4 additions and 1 deletions

View File

@ -2,7 +2,7 @@
#
# This file is part of Glances.
#
# Copyright (C) 2019 Nicolargo <nicolas@nicolargo.com>
# Copyright (C) 2020 Nicolargo <nicolas@nicolargo.com>
#
# Glances is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
@ -145,6 +145,9 @@ class AmpsList(object):
if (re.search(amp_value.regex(), p['name']) is not None):
add_it = True
else:
if p['cmdline'] is None:
# See issue #1689 (thanks to @darylkell)
continue
for c in p['cmdline']:
if (re.search(amp_value.regex(), c) is not None):
add_it = True