menderbot.check   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 2

1 Function

Rating   Name   Duplication   Size   Complexity  
A run_check() 0 10 2
1
import subprocess
2
3
4
def run_check(command: str) -> tuple[bool, str]:
5
    try:
6
        return (
7
            True,
8
            subprocess.check_output(
9
                command, stderr=subprocess.STDOUT, shell=True, text=True
10
            ),
11
        )
12
    except subprocess.CalledProcessError as e:
13
        return (False, e.output)
14