Skip to content

Commit

Permalink
Filter wit.ai API keys before saving them to the Config object
Browse files Browse the repository at this point in the history
  • Loading branch information
AliOsm committed Aug 21, 2023
1 parent 6ff7fa8 commit 61b00d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tafrigh/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(
)

def use_wit(self) -> bool:
return self.wit.wit_client_access_tokens != []
return self.wit.wit_client_access_tokens is not None and self.wit.wit_client_access_tokens != []

class Input:
def __init__(self, urls_or_paths: list[str], skip_if_output_exist: bool, playlist_items: str, verbose: bool):
Expand Down Expand Up @@ -84,7 +84,7 @@ def __init__(

class Wit:
def __init__(self, wit_client_access_tokens: list[str], max_cutting_duration: int):
self.wit_client_access_tokens = wit_client_access_tokens
self.wit_client_access_tokens = [key for key in wit_client_access_tokens if key is not None]
self.max_cutting_duration = max_cutting_duration

class Output:
Expand Down

0 comments on commit 61b00d0

Please sign in to comment.