The createDefaultKnownNodes function now uses a with statement

This commit is contained in:
Lucretiel 2013-08-08 03:52:47 -04:00
parent fed1f7a3cc
commit 854b739431
1 changed files with 3 additions and 5 deletions

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):