Fix SpiderState bug in Windows platforms

The spider state file was not opened in binary mode.
This commit is contained in:
Pablo Hoffman 2012-11-03 16:57:16 -02:00
parent c0542838d3
commit 626662f0f3
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ class SpiderState(object):
def spider_opened(self, spider):
if self.jobdir and os.path.exists(self.statefn):
with open(self.statefn) as f:
with open(self.statefn, 'rb') as f:
spider.state = pickle.load(f)
else:
spider.state = {}