Skip to content

Commit

Permalink
Fix: Wrap is_interactive() checks in an exception handler, enables …
Browse files Browse the repository at this point in the history
…running in ASGI environments (#263)
  • Loading branch information
rshorser authored May 30, 2024
1 parent ad850f0 commit 499eeed
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions airbyte/_util/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,16 @@ def is_colab() -> bool:

@lru_cache
def is_interactive() -> bool:
if is_colab() or is_jupyter():
return True
try:
if is_colab() or is_jupyter():
return True

if is_ci():
return False
if is_ci():
return False

return bool(sys.__stdin__.isatty() and sys.__stdout__.isatty())
return bool(sys.__stdin__.isatty() and sys.__stdout__.isatty())
except Exception:
return False


@lru_cache
Expand Down

0 comments on commit 499eeed

Please sign in to comment.