Skip to content

Commit f0cefb4

Browse files
committed
fix: test highlighted log=none error, fixed
1 parent e8d8867 commit f0cefb4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

workbench_core.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,9 @@ def prepare_cookies(
589589
return cookies_file
590590

591591

592+
# In workbench_core.py
593+
594+
592595
def convert_cookie_editor_json_to_netscape(json_path: Path, out_txt: Path, log) -> Path:
593596
"""Convert Cookie-Editor/EditThisCookie JSON into a Netscape cookies.txt with header."""
594597
try:
@@ -629,10 +632,15 @@ def convert_cookie_editor_json_to_netscape(json_path: Path, out_txt: Path, log)
629632
domain_field = ("#HttpOnly_" + domain) if c.get("httpOnly") else domain
630633
lines.append("\t".join([domain_field, include_sub, path, https, str(exp), name, value]))
631634
out_txt.write_text(header + "\n".join(lines) + "\n", encoding="utf-8")
632-
log(f"Converted JSON cookies -> {out_txt}")
635+
636+
# vvv FIX IS HERE vvv
637+
if log:
638+
log(f"Converted JSON cookies -> {out_txt}")
633639
return out_txt
634640
except Exception as e:
635-
log(f"Cookie JSON convert failed: {e}")
641+
# vvv AND FIX IS HERE vvv
642+
if log:
643+
log(f"Cookie JSON convert failed: {e}")
636644
return out_txt
637645

638646

0 commit comments

Comments
 (0)