Skip to content

Commit 987cd94

Browse files
committed
ff
1 parent 75c0d2d commit 987cd94

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/main.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import os
1+
import subprocess
22
from contextlib import asynccontextmanager
33

44
import sentry_sdk
@@ -18,8 +18,9 @@
1818
from app.config import settings
1919
from app.core.cache import Cache
2020

21-
version = os.popen("poetry version --short").read().strip()
22-
21+
version = subprocess.run(
22+
["poetry", "version", "--short"], capture_output=True, text=True, check=True
23+
).stdout.strip()
2324

2425
sentry_sdk.init(
2526
dsn=settings.SENTRY_DSN,

0 commit comments

Comments
 (0)