fix unittests, empty cookiefile

This commit is contained in:
Simon 2026-01-25 14:45:11 +07:00
parent 71bc8383e5
commit 6adae31641
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 4 additions and 0 deletions

View File

@ -134,6 +134,10 @@ class YtWrap:
def _validate_cookie(self):
"""check cookie and write it back for next use"""
if not self.obs.get("cookiefile"):
# empty in tests
return
self.obs["cookiefile"].seek(0)
new_cookie = self.obs["cookiefile"].read().strip("\x00")