Skip to content

Commit

Permalink
clar: make it compatible with python3
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmn committed Jan 4, 2013
1 parent 1d5d418 commit 702c3bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests-clar/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def load_cache(self):
cache = {}

try:
fp = open(path)
fp = open(path, 'rb')
cache = pickle.load(fp)
fp.close()
except IOError:
Expand All @@ -164,7 +164,7 @@ def load_cache(self):

def save_cache(self):
path = os.path.join(self.path, '.clarcache')
with open(path, 'w') as cache:
with open(path, 'wb') as cache:
pickle.dump(self.modules, cache)

def load(self, force = False):
Expand Down Expand Up @@ -233,5 +233,5 @@ def write(self):
suite.load(options.force)
suite.disable(options.excluded)
if suite.write():
print "Written `clar.suite` (%d suites)" % len(suite.modules)
print("Written `clar.suite` (%d suites)" % len(suite.modules))

0 comments on commit 702c3bf

Please sign in to comment.