Autosave: 2024-04-29 18:00:04

This commit is contained in:
thomasabishop 2024-04-29 18:00:04 +01:00
parent a784a952d4
commit 0215854f25
2 changed files with 10 additions and 12 deletions

Binary file not shown.

View file

@ -10,18 +10,16 @@ created: Monday, April 29, 2024
```py ```py
import subprocess import subprocess
try: try:
process = subprocess.run( process = subprocess.run(
["timew export"], ["ls", "-la"],
shell=True, shell=True,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, stderr=subprocess.PIPE,
text=True, text=True,
) )
return json.loads(process.stdout) return json.loads(process.stdout)
except subprocess.CalledProcessError as e:
except subprocess.CalledProcessError as e:
return e.stderr.strip() return e.stderr.strip()
``` ```