fixed wrong var used for peer causing crash

This commit is contained in:
Kevin Froman 2018-04-25 18:21:43 -05:00
parent c249a42bb7
commit acd5494979
No known key found for this signature in database
GPG key ID: 0D414D0FE405B63B
3 changed files with 9 additions and 4 deletions

View file

@ -572,13 +572,13 @@ class Onionr:
newFile = sys.argv[2]
logger.info('Attempting to add file...')
try:
with open(newFile, 'r') as new:
with open(newFile, 'rb') as new:
new = new.read()
except FileNotFoundError:
logger.warn('That file does not exist. Improper path?')
else:
logger.debug(new)
self.onionrCore.insertBlock(new, header='bin')
logger.info(self.onionrCore.insertBlock(new, header='bin'))
Onionr()