The createDefaultKnownNodes function now uses a with statement #388

Merged
Lucretiel merged 1 commits from patch-1 into master 2013-08-09 16:32:45 +02:00

View File

@ -37,12 +37,10 @@ def createDefaultKnownNodes(appdata):
#print stream1
#print allKnownNodes
output = open(appdata + 'knownnodes.dat', 'wb')
with open(appdata + 'knownnodes.dat', 'wb) as output:
# Pickle dictionary using protocol 0.
pickle.dump(allKnownNodes, output)
# Pickle dictionary using protocol 0.
pickle.dump(allKnownNodes, output)
output.close()
return allKnownNodes
def readDefaultKnownNodes(appdata):