Skip to content

Commit 0a6e34c

Browse files
committed
Use os.O_TRUNC
1 parent 57aa616 commit 0a6e34c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bpython/history.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def load_from(self, fd):
182182
return entries if len(entries) else ['']
183183

184184
def save(self, filename, encoding, lines=0):
185-
fd = os.open(filename, os.O_WRONLY | os.O_CREAT | os.TRUNC,
185+
fd = os.open(filename, os.O_WRONLY | os.O_CREAT | os.O_TRUNC,
186186
stat.S_IRUSR | stat.S_IWUSR)
187187
with io.open(fd, 'w', encoding=encoding,
188188
errors='ignore') as hfile:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy