Fix detection of ModemManager (#7076)
parent
8baed70ed1
commit
f64d9b0621
|
@ -52,10 +52,10 @@ def doctor(cli):
|
||||||
if shutil.which('systemctl'):
|
if shutil.which('systemctl'):
|
||||||
mm_check = subprocess.run(['systemctl', 'list-unit-files'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10, universal_newlines=True)
|
mm_check = subprocess.run(['systemctl', 'list-unit-files'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=10, universal_newlines=True)
|
||||||
if mm_check.returncode == 0:
|
if mm_check.returncode == 0:
|
||||||
mm = True
|
mm = False
|
||||||
for line in mm_check.stdout.split('\n'):
|
for line in mm_check.stdout.split('\n'):
|
||||||
if 'ModemManager' in line and 'enabled' in line:
|
if 'ModemManager' in line and 'enabled' in line:
|
||||||
mm = False
|
mm = True
|
||||||
|
|
||||||
if mm:
|
if mm:
|
||||||
cli.log.warn("{bg_yellow}Detected ModemManager. Please disable it if you are using a Pro-Micro.")
|
cli.log.warn("{bg_yellow}Detected ModemManager. Please disable it if you are using a Pro-Micro.")
|
||||||
|
|
Loading…
Reference in New Issue