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)