Skip to content

Commit

Permalink
hopefully its the final linter thing
Browse files Browse the repository at this point in the history
  • Loading branch information
jweezy24 committed Sep 27, 2024
1 parent 67c99f9 commit 8f48b78
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion runcmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ def catch_err(p : subprocess.Popen[bytes], cmd='', msg='', time=10, large_output
if large_output:
s = large_output_var.decode()
else:
s = p.stdout.read().decode()
if p.stdout:
s = p.stdout.read().decode()
else:
return ""

if (len(s) <= 100 and re.search('(?i)(fail|error)', s)) or \
'insufficient permissions for device: user in plugdev group; are your udev rules wrong?'\
Expand Down

0 comments on commit 8f48b78

Please sign in to comment.