Skip to content

Commit

Permalink
[core] Change default value of the title attribute of the Chat object
Browse files Browse the repository at this point in the history
Changed to an empty string to avoid issues in situations where the title was not extracted, but the `safe_path` function called in `_init_writer` requires a string.
  • Loading branch information
mikelei8291 committed Jun 29, 2022
1 parent c06da89 commit 2851fb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chat_downloader/sites/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ class Chat():
next value is yielded from the object's `chat` generator method.
"""

def __init__(self, chat=None, title=None, duration=None, status=None, video_type=None, start_time=None, id=None, **kwargs):
def __init__(self, chat=None, title="", duration=None, status=None, video_type=None, start_time=None, id=None, **kwargs):
"""Create a Chat object
:param chat: Generator method for retrieving chat messages, defaults to None
:type chat: generator, optional
:param title: Stream or video title, defaults to None
:param title: Stream or video title, defaults to an empty string
:type title: str, optional
:param duration: Duration of the stream or video, defaults to None
:type duration: float, optional
Expand Down

0 comments on commit 2851fb7

Please sign in to comment.