save_flow now uses with, and pyperclip requirement updated to 1.5.8

This commit is contained in:
Marcelo Glezer 2015-02-06 00:44:43 -03:00
parent 1455707eb1
commit 64c02a16c3
2 changed files with 3 additions and 4 deletions

View File

@ -172,9 +172,8 @@ def save_body(path, master, state, content):
state.last_saveload = path
path = os.path.expanduser(path)
try:
f = file(path, "wb")
f.write(str(content))
f.close()
with file(path, "wb") as f:
f.write(content)
except IOError, v:
master.statusbar.message(v.strerror)

View File

@ -21,7 +21,7 @@ deps = {
"pyOpenSSL>=0.14",
"tornado>=4.0.2",
"configargparse>=0.9.3",
"pyperclip>=1.5.7"
"pyperclip>=1.5.8"
}
script_deps = {
"mitmproxy": {