Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix crimes against bracket pair formatting
  • Loading branch information
ambv committed Dec 20, 2022
commit 7715d924bc6fca55b4cd1eee870690ccfadec3ed
10 changes: 6 additions & 4 deletions Lib/http/cookiejar.py
Original file line number Diff line number Diff line change
Expand Up @@ -1891,8 +1891,9 @@ def save(self, filename=None, ignore_discard=False, ignore_expires=False):
else: raise ValueError(MISSING_FILENAME_TEXT)

with os.fdopen(
os.open(filename, os.O_CREAT | os.O_WRONLY | os.O_TRUNC, 0o600,
), 'w') as f:
os.open(filename, os.O_CREAT | os.O_WRONLY | os.O_TRUNC, 0o600),
'w',
) as f:
# There really isn't an LWP Cookies 2.0 format, but this indicates
# that there is extra information in here (domain_dot and
# port_spec) while still being compatible with libwww-perl, I hope.
Expand Down Expand Up @@ -2089,8 +2090,9 @@ def save(self, filename=None, ignore_discard=False, ignore_expires=False):
else: raise ValueError(MISSING_FILENAME_TEXT)

with os.fdopen(
os.open(filename, os.O_CREAT | os.O_WRONLY | os.O_TRUNC, 0o600,
), 'w') as f:
os.open(filename, os.O_CREAT | os.O_WRONLY | os.O_TRUNC, 0o600),
'w',
) as f:
f.write(NETSCAPE_HEADER_TEXT)
now = time.time()
for cookie in self:
Expand Down