1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Refactoring

This commit is contained in:
Shlomi Fish 2018-03-13 15:56:11 +02:00
parent e4775b805d
commit 81be7c98ad

View file

@ -285,8 +285,7 @@ def pickle(obj, filename, protocol=0):
f = None
try:
f = open(filename, "wb")
p = Pickler(f, protocol)
p.dump(obj)
Pickler(f, protocol).dump(obj)
f.close()
f = None
# print "Pickled", filename
@ -299,8 +298,7 @@ def unpickle(filename):
f, obj = None, None
try:
f = open(filename, "rb")
p = Unpickler(f)
x = p.load()
x = Unpickler(f).load()
f.close()
f = None
obj = x