mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-01 04:39:20 +00:00
clar: make it compatible with python3
This commit is contained in:
parent
1d5d418671
commit
702c3bf70e
@ -154,7 +154,7 @@ class TestSuite(object):
|
|||||||
cache = {}
|
cache = {}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
fp = open(path)
|
fp = open(path, 'rb')
|
||||||
cache = pickle.load(fp)
|
cache = pickle.load(fp)
|
||||||
fp.close()
|
fp.close()
|
||||||
except IOError:
|
except IOError:
|
||||||
@ -164,7 +164,7 @@ class TestSuite(object):
|
|||||||
|
|
||||||
def save_cache(self):
|
def save_cache(self):
|
||||||
path = os.path.join(self.path, '.clarcache')
|
path = os.path.join(self.path, '.clarcache')
|
||||||
with open(path, 'w') as cache:
|
with open(path, 'wb') as cache:
|
||||||
pickle.dump(self.modules, cache)
|
pickle.dump(self.modules, cache)
|
||||||
|
|
||||||
def load(self, force = False):
|
def load(self, force = False):
|
||||||
@ -233,5 +233,5 @@ if __name__ == '__main__':
|
|||||||
suite.load(options.force)
|
suite.load(options.force)
|
||||||
suite.disable(options.excluded)
|
suite.disable(options.excluded)
|
||||||
if suite.write():
|
if suite.write():
|
||||||
print "Written `clar.suite` (%d suites)" % len(suite.modules)
|
print("Written `clar.suite` (%d suites)" % len(suite.modules))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user