Fix #541
This commit is contained in:
parent
7a7385496e
commit
d34114d14c
|
@ -147,17 +147,26 @@ class singleWorker(threading.Thread):
|
||||||
shared.broadcastToSendDataQueues((
|
shared.broadcastToSendDataQueues((
|
||||||
streamNumber, 'advertiseobject', inventoryHash))
|
streamNumber, 'advertiseobject', inventoryHash))
|
||||||
shared.UISignalQueue.put(('updateStatusBar', ''))
|
shared.UISignalQueue.put(('updateStatusBar', ''))
|
||||||
shared.config.set(
|
try:
|
||||||
myAddress, 'lastpubkeysendtime', str(int(time.time())))
|
shared.config.set(
|
||||||
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
|
myAddress, 'lastpubkeysendtime', str(int(time.time())))
|
||||||
shared.config.write(configfile)
|
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
|
||||||
|
shared.config.write(configfile)
|
||||||
|
except:
|
||||||
|
# The user deleted the address out of the keys.dat file before this
|
||||||
|
# finished.
|
||||||
|
pass
|
||||||
|
|
||||||
# If this isn't a chan address, this function assembles the pubkey data,
|
# If this isn't a chan address, this function assembles the pubkey data,
|
||||||
# does the necessary POW and sends it out. If it *is* a chan then it
|
# does the necessary POW and sends it out. If it *is* a chan then it
|
||||||
# assembles the pubkey and stores is in the pubkey table so that we can
|
# assembles the pubkey and stores is in the pubkey table so that we can
|
||||||
# send messages to "ourselves".
|
# send messages to "ourselves".
|
||||||
def sendOutOrStoreMyV3Pubkey(self, hash):
|
def sendOutOrStoreMyV3Pubkey(self, hash):
|
||||||
myAddress = shared.myAddressesByHash[hash]
|
try:
|
||||||
|
myAddress = shared.myAddressesByHash[hash]
|
||||||
|
except:
|
||||||
|
#The address has been deleted.
|
||||||
|
return
|
||||||
if shared.safeConfigGetBoolean(myAddress, 'chan'):
|
if shared.safeConfigGetBoolean(myAddress, 'chan'):
|
||||||
with shared.printLock:
|
with shared.printLock:
|
||||||
print 'This is a chan address. Not sending pubkey.'
|
print 'This is a chan address. Not sending pubkey.'
|
||||||
|
@ -224,14 +233,22 @@ class singleWorker(threading.Thread):
|
||||||
shared.broadcastToSendDataQueues((
|
shared.broadcastToSendDataQueues((
|
||||||
streamNumber, 'advertiseobject', inventoryHash))
|
streamNumber, 'advertiseobject', inventoryHash))
|
||||||
shared.UISignalQueue.put(('updateStatusBar', ''))
|
shared.UISignalQueue.put(('updateStatusBar', ''))
|
||||||
shared.config.set(
|
try:
|
||||||
myAddress, 'lastpubkeysendtime', str(int(time.time())))
|
shared.config.set(
|
||||||
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
|
myAddress, 'lastpubkeysendtime', str(int(time.time())))
|
||||||
shared.config.write(configfile)
|
with open(shared.appdata + 'keys.dat', 'wb') as configfile:
|
||||||
|
shared.config.write(configfile)
|
||||||
|
except:
|
||||||
|
# The user deleted the address out of the keys.dat file before this
|
||||||
|
# finished.
|
||||||
|
pass
|
||||||
|
|
||||||
# If this isn't a chan address, this function assembles the pubkey data,
|
# If this isn't a chan address, this function assembles the pubkey data,
|
||||||
# does the necessary POW and sends it out.
|
# does the necessary POW and sends it out.
|
||||||
def sendOutOrStoreMyV4Pubkey(self, myAddress):
|
def sendOutOrStoreMyV4Pubkey(self, myAddress):
|
||||||
|
if not shared.config.has_section(myAddress):
|
||||||
|
#The address has been deleted.
|
||||||
|
return
|
||||||
if shared.safeConfigGetBoolean(myAddress, 'chan'):
|
if shared.safeConfigGetBoolean(myAddress, 'chan'):
|
||||||
with shared.printLock:
|
with shared.printLock:
|
||||||
print 'This is a chan address. Not sending pubkey.'
|
print 'This is a chan address. Not sending pubkey.'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user