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
import subprocess
try:
process = subprocess.run(
["timew export"],
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
)
return json.loads(process.stdout)
except subprocess.CalledProcessError as e:
process = subprocess.run(
["ls", "-la"],
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
)
return json.loads(process.stdout)
except subprocess.CalledProcessError as e:
return e.stderr.strip()
```