save_flow now uses with, and pyperclip requirement updated to 1.5.8
This commit is contained in:
parent
1455707eb1
commit
64c02a16c3
|
@ -172,9 +172,8 @@ def save_body(path, master, state, content):
|
||||||
state.last_saveload = path
|
state.last_saveload = path
|
||||||
path = os.path.expanduser(path)
|
path = os.path.expanduser(path)
|
||||||
try:
|
try:
|
||||||
f = file(path, "wb")
|
with file(path, "wb") as f:
|
||||||
f.write(str(content))
|
f.write(content)
|
||||||
f.close()
|
|
||||||
except IOError, v:
|
except IOError, v:
|
||||||
master.statusbar.message(v.strerror)
|
master.statusbar.message(v.strerror)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue