We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 934c5b6 commit 2b32c81Copy full SHA for 2b32c81
bpython/history.py
@@ -190,7 +190,7 @@ def load_from(self, fd):
190
def save(self, filename, encoding, lines=0):
191
fd = os.open(filename, os.O_WRONLY | os.O_CREAT | os.TRUNC,
192
stat.S_IRUSR | stat.S_IWUSR)
193
- with io.open(filename, 'w', encoding=encoding,
+ with io.open(fd, 'w', encoding=encoding,
194
errors='ignore') as hfile:
195
with FileLock(hfile):
196
self.save_to(hfile, self.entries, lines)
0 commit comments