Skip to content

Commit

Permalink
None
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom committed Dec 4, 2023
1 parent 3ec1236 commit dab5b2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions livekit-api/livekit/api/access_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ def __init__(
api_secret: Optional[str] = None,
) -> None:
if not api_key:
api_key = os.getenv("LIVEKIT_API_KEY", "")
api_key = os.getenv("LIVEKIT_API_KEY")

if not api_secret:
api_secret = os.getenv("LIVEKIT_API_SECRET", "")
api_secret = os.getenv("LIVEKIT_API_SECRET")

if not api_key or not api_secret:
raise ValueError("api_key and api_secret must be set")
Expand Down Expand Up @@ -151,10 +151,10 @@ def __init__(
leeway: datetime.timedelta = DEFAULT_LEEWAY,
) -> None:
if not api_key:
api_key = os.getenv("LIVEKIT_API_KEY", "")
api_key = os.getenv("LIVEKIT_API_KEY")

if not api_secret:
api_secret = os.getenv("LIVEKIT_API_SECRET", "")
api_secret = os.getenv("LIVEKIT_API_SECRET")

if not api_key or not api_secret:
raise ValueError("api_key and api_secret must be set")
Expand Down
6 changes: 3 additions & 3 deletions livekit-api/livekit/api/livekit_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ def __init__(
timeout: float = 60, # 1 minutes by default
):
if not url:
url = os.getenv("LIVEKIT_URL", "")
url = os.getenv("LIVEKIT_URL")

if not api_key:
api_key = os.getenv("LIVEKIT_API_KEY", "")
api_key = os.getenv("LIVEKIT_API_KEY")

if not api_secret:
api_secret = os.getenv("LIVEKIT_API_SECRET", "")
api_secret = os.getenv("LIVEKIT_API_SECRET")

if not url:
raise ValueError("url must be set")
Expand Down

0 comments on commit dab5b2d

Please sign in to comment.