Merge pull request #54 from mhils/fix_r_option

fix -r option, read file in binary mode
This commit is contained in:
Aldo Cortesi 2012-07-23 18:47:03 -07:00
commit a5bf9d3eb3
2 changed files with 2 additions and 2 deletions

View File

@ -649,7 +649,7 @@ class ConsoleMaster(flow.FlowMaster):
self.state.last_saveload = path
path = os.path.expanduser(path)
try:
f = file(path, "r")
f = file(path, "rb")
fr = flow.FlowReader(f)
except IOError, v:
return v.strerror

View File

@ -121,7 +121,7 @@ class DumpMaster(flow.FlowMaster):
if options.rfile:
path = os.path.expanduser(options.rfile)
try:
f = file(path, "r")
f = file(path, "rb")
freader = flow.FlowReader(f)
except IOError, v:
raise DumpError(v.strerror)