Fixes #846
This commit is contained in:
parent
ec922adb36
commit
efaedae801
|
@ -24,7 +24,7 @@ from version import softwareVersion # pylint: disable=wrong-import-position
|
|||
|
||||
|
||||
def get_tool_results(file_list):
|
||||
"""Take a list of files and resuln the results of applying the tools"""
|
||||
"""Take a list of files and the results of applying the tools"""
|
||||
|
||||
results = []
|
||||
for path_to_file in file_list:
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# pylint: disable=too-many-nested-blocks,too-many-locals,protected-access,too-many-arguments,too-many-function-args
|
||||
# pylint: disable=no-member
|
||||
"""
|
||||
Created by Adam Melton (.dok) referenceing https://bitmessage.org/wiki/API_Reference for API documentation
|
||||
Created by Adam Melton (.dok) referencing https://bitmessage.org/wiki/API_Reference for API documentation
|
||||
Distributed under the MIT/X11 software license. See http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
This is an example of a daemon client for PyBitmessage 0.6.2, by .dok (Version 0.3.1) , modified
|
||||
|
@ -448,7 +448,7 @@ def subscribe():
|
|||
|
||||
|
||||
def unsubscribe():
|
||||
"""Unsusbcribe from an address"""
|
||||
"""Unsubscribe from an address"""
|
||||
global usrPrompt
|
||||
|
||||
while True:
|
||||
|
@ -623,7 +623,7 @@ def genAdd(lbl, deterministic, passphrase, numOfAdd, addVNum, streamNum, ripe):
|
|||
|
||||
|
||||
def saveFile(fileName, fileData):
|
||||
"""Allows attachments and messages/broadcats to be saved"""
|
||||
"""Allows attachments and messages/broadcasts to be saved"""
|
||||
|
||||
# This section finds all invalid characters and replaces them with ~
|
||||
fileName = fileName.replace(" ", "")
|
||||
|
@ -1337,7 +1337,7 @@ def markMessageRead(messageID):
|
|||
|
||||
|
||||
def markMessageUnread(messageID):
|
||||
"""Mark a mesasge as unread"""
|
||||
"""Mark a message as unread"""
|
||||
|
||||
global usrPrompt
|
||||
|
||||
|
@ -1541,7 +1541,7 @@ def UI(usrInput):
|
|||
usrPrompt = 1
|
||||
main()
|
||||
|
||||
elif usrInput == "subscribe": # Subsribe to an address
|
||||
elif usrInput == "subscribe": # Subscribe to an address
|
||||
subscribe()
|
||||
usrPrompt = 1
|
||||
main()
|
||||
|
|
|
@ -226,7 +226,7 @@ BoxLayout:
|
|||
text: 'TO'
|
||||
color: 0,0,0,1
|
||||
TextInput:
|
||||
id: recipent
|
||||
id: recipient
|
||||
hint_text: 'To'
|
||||
|
||||
BoxLayout:
|
||||
|
@ -348,7 +348,7 @@ BoxLayout:
|
|||
color: 0,0,0,1
|
||||
|
||||
<AddressSuccessful>:
|
||||
name: 'add_sucess'
|
||||
name: 'add_success'
|
||||
Label:
|
||||
text: 'Successfully created a new bit address'
|
||||
color: 0,0,0,1
|
||||
|
|
|
@ -157,7 +157,7 @@ class Inbox(Screen):
|
|||
Clock.schedule_once(self.init_ui, 0)
|
||||
|
||||
def init_ui(self, dt=0):
|
||||
"""Clock Schdule for method inbox accounts."""
|
||||
"""Clock Schedule for method inbox accounts."""
|
||||
self.inboxaccounts()
|
||||
print(dt)
|
||||
|
||||
|
@ -208,7 +208,7 @@ class Sent(Screen):
|
|||
Clock.schedule_once(self.init_ui, 0)
|
||||
|
||||
def init_ui(self, dt=0):
|
||||
"""Clock Schdule for method sent accounts."""
|
||||
"""Clock Schedule for method sent accounts."""
|
||||
self.sentaccounts()
|
||||
print(dt)
|
||||
|
||||
|
@ -251,7 +251,7 @@ class Trash(Screen):
|
|||
Clock.schedule_once(self.init_ui, 0)
|
||||
|
||||
def init_ui(self, dt=0):
|
||||
"""Clock Schdule for method inbox accounts."""
|
||||
"""Clock Schedule for method inbox accounts."""
|
||||
self.inboxaccounts()
|
||||
print(dt)
|
||||
|
||||
|
@ -303,7 +303,7 @@ class Create(Screen):
|
|||
def send(self):
|
||||
"""Send message from one address to another."""
|
||||
fromAddress = self.ids.spinner_id.text
|
||||
# For now we are using static address i.e we are not using recipent field value.
|
||||
# For now we are using static address i.e we are not using recipient field value.
|
||||
toAddress = "BM-2cWyUfBdY2FbgyuCb7abFZ49JYxSzUhNFe"
|
||||
message = self.ids.message.text
|
||||
subject = self.ids.subject.text
|
||||
|
@ -350,7 +350,7 @@ class Create(Screen):
|
|||
self.ids.message.text = ''
|
||||
self.ids.spinner_id.text = '<select>'
|
||||
self.ids.subject.text = ''
|
||||
self.ids.recipent.text = ''
|
||||
self.ids.recipient.text = ''
|
||||
return None
|
||||
|
||||
def cancel(self):
|
||||
|
@ -358,7 +358,7 @@ class Create(Screen):
|
|||
self.ids.message.text = ''
|
||||
self.ids.spinner_id.text = '<select>'
|
||||
self.ids.subject.text = ''
|
||||
self.ids.recipent.text = ''
|
||||
self.ids.recipient.text = ''
|
||||
return None
|
||||
|
||||
|
||||
|
@ -386,7 +386,7 @@ class NewIdentity(Screen):
|
|||
nonceTrialsPerByte,
|
||||
payloadLengthExtraBytes)
|
||||
)
|
||||
self.manager.current = 'add_sucess'
|
||||
self.manager.current = 'add_success'
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -1671,7 +1671,7 @@ class MyForm(settingsmixin.SMainWindow):
|
|||
QtCore.QTimer.singleShot(0, self.appIndicatorHide)
|
||||
elif event.oldState() & QtCore.Qt.WindowMinimized:
|
||||
# The window state has just been changed to
|
||||
# Normal/Maximised/FullScreen
|
||||
# Normal/Maximized/FullScreen
|
||||
pass
|
||||
|
||||
def __icon_activated(self, reason):
|
||||
|
|
|
@ -50,7 +50,7 @@ def getSortedSubscriptions(count=False):
|
|||
|
||||
:param count: Whether to count messages for each fromaddress in the inbox
|
||||
:type count: bool, default False
|
||||
:retuns: dict keys are addresses, values are dicts containing settings
|
||||
:returns: dict keys are addresses, values are dicts containing settings
|
||||
:rtype: dict, default {}
|
||||
"""
|
||||
queryreturn = sqlQuery('SELECT label, address, enabled FROM subscriptions ORDER BY label COLLATE NOCASE ASC')
|
||||
|
|
|
@ -599,7 +599,7 @@ class AddressBookCompleter(QtGui.QCompleter):
|
|||
else:
|
||||
self.cursorPos = self.widget().cursorPosition()
|
||||
|
||||
# Get current prosition
|
||||
# Get current position
|
||||
curIndex = self.widget().cursorPosition()
|
||||
|
||||
# prev_delimiter_index should actually point at final white space
|
||||
|
|
|
@ -120,7 +120,7 @@ class NewAddressWizardPassphrasePage(QtGui.QWizardPage):
|
|||
super(QtGui.QWizardPage, self).__init__()
|
||||
self.setTitle("Passphrase")
|
||||
|
||||
label = QtGui.QLabel("Deterministric address.")
|
||||
label = QtGui.QLabel("Deterministic address.")
|
||||
label.setWordWrap(True)
|
||||
|
||||
passphraseLabel = QtGui.QLabel("Passphrase")
|
||||
|
|
|
@ -24,7 +24,7 @@ def identiconize(address):
|
|||
identicon_lib = BMConfigParser().safeGet(
|
||||
'bitmessagesettings', 'identiconlib', 'qidenticon_two_x')
|
||||
|
||||
# As an 'identiconsuffix' you could put "@bitmessge.ch" or "@bm.addr"
|
||||
# As an 'identiconsuffix' you could put "@bitmessage.ch" or "@bm.addr"
|
||||
# to make it compatible with other identicon generators. (Note however,
|
||||
# that E-Mail programs might convert the BM-address to lowercase first.)
|
||||
# It can be used as a pseudo-password to salt the generation of
|
||||
|
@ -34,7 +34,7 @@ def identiconize(address):
|
|||
if identicon_lib[:len('qidenticon')] == 'qidenticon':
|
||||
# originally by:
|
||||
# :Author:Shin Adachi <shn@glucose.jp>
|
||||
# Licesensed under FreeBSD License.
|
||||
# Licensed under FreeBSD License.
|
||||
# stripped from PIL and uses QT instead (by sendiulo, same license)
|
||||
import qidenticon
|
||||
icon_hash = hashlib.md5(
|
||||
|
|
|
@ -160,7 +160,7 @@ class sqlThread(threading.Thread):
|
|||
self.cur.execute(
|
||||
'''INSERT INTO subscriptions VALUES'''
|
||||
'''('Bitmessage new releases/announcements','BM-GtovgYdgs7qXPkoYaRgrLFuFKz1SFpsw',1)''')
|
||||
logger.debug('Commiting.')
|
||||
logger.debug('Committing.')
|
||||
self.conn.commit()
|
||||
logger.debug('Vacuuming message.dat. You might notice that the file size gets much smaller.')
|
||||
self.cur.execute(''' VACUUM ''')
|
||||
|
@ -433,7 +433,7 @@ class sqlThread(threading.Thread):
|
|||
else:
|
||||
logger.error(err)
|
||||
|
||||
# Let us check to see the last time we vaccumed the messages.dat file.
|
||||
# Let us check to see the last time we vacuumed the messages.dat file.
|
||||
# If it has been more than a month let's do it now.
|
||||
item = '''SELECT value FROM settings WHERE key='lastvacuumtime';'''
|
||||
parameters = ''
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
"""
|
||||
Logging and debuging facility
|
||||
Logging and debugging facility
|
||||
-----------------------------
|
||||
|
||||
Levels:
|
||||
|
@ -46,7 +46,7 @@ import state
|
|||
|
||||
helper_startup.loadConfig()
|
||||
|
||||
# Now can be overriden from a config file, which uses standard python
|
||||
# Now can be overridden from a config file, which uses standard python
|
||||
# logging.config.fileConfig interface
|
||||
# examples are here:
|
||||
# https://bitmessage.org/forum/index.php/topic,4820.msg11163.html#msg11163
|
||||
|
|
|
@ -178,7 +178,7 @@ def check_sqlite():
|
|||
"""Do sqlite check.
|
||||
|
||||
Simply check sqlite3 module if exist or not with hexversion
|
||||
support in python version for specifieed platform.
|
||||
support in python version for specified platform.
|
||||
"""
|
||||
if sys.hexversion < 0x020500F0:
|
||||
logger.error(
|
||||
|
@ -224,7 +224,7 @@ def check_sqlite():
|
|||
return False
|
||||
return True
|
||||
except sqlite3.Error:
|
||||
logger.exception('An exception occured while checking sqlite.')
|
||||
logger.exception('An exception occurred while checking sqlite.')
|
||||
return False
|
||||
finally:
|
||||
if conn:
|
||||
|
@ -374,12 +374,12 @@ def check_pyqt():
|
|||
passed = True
|
||||
if QtCore.PYQT_VERSION < 0x40800:
|
||||
logger.error(
|
||||
'This version of PyQt is too old. PyBitmessage requries'
|
||||
'This version of PyQt is too old. PyBitmessage requires'
|
||||
' PyQt 4.8 or later.')
|
||||
passed = False
|
||||
if QtCore.QT_VERSION < 0x40700:
|
||||
logger.error(
|
||||
'This version of Qt is too old. PyBitmessage requries'
|
||||
'This version of Qt is too old. PyBitmessage requires'
|
||||
' Qt 4.7 or later.')
|
||||
passed = False
|
||||
return passed
|
||||
|
|
|
@ -71,7 +71,7 @@ def loadConfig():
|
|||
config.set('bitmessagesettings', 'startonlogon', 'false')
|
||||
if 'linux' in sys.platform:
|
||||
config.set('bitmessagesettings', 'minimizetotray', 'false')
|
||||
# This isn't implimented yet and when True on
|
||||
# This isn't implemented yet and when True on
|
||||
# Ubuntu causes Bitmessage to disappear while
|
||||
# running when minimized.
|
||||
else:
|
||||
|
|
|
@ -28,7 +28,7 @@ class MDAccordionItem(ThemableBehavior, AccordionItem):
|
|||
''' Color for title text and icon if `title_theme_color` is Custom '''
|
||||
|
||||
background_color = ListProperty(None, allownone=True)
|
||||
''' Color for the background of the accordian item title in rgba format.
|
||||
''' Color for the background of the accordion item title in rgba format.
|
||||
'''
|
||||
|
||||
divider_color = ListProperty(None, allownone=True)
|
||||
|
|
|
@ -100,7 +100,7 @@ def tail(f, lines=20):
|
|||
f.seek(block_number * BLOCK_SIZE, 2)
|
||||
blocks.append(f.read(BLOCK_SIZE))
|
||||
else:
|
||||
# file too small, start from begining
|
||||
# file too small, start from beginning
|
||||
f.seek(0, 0)
|
||||
# only read what was not read
|
||||
blocks.append(f.read(block_end_byte))
|
||||
|
|
|
@ -138,7 +138,7 @@ class DonRenderer(IdenticonRendererBase):
|
|||
[(0, 0), (4, 0), (4, 4), (0, 4)],
|
||||
# [1] right-angled triangle pointing top-left:
|
||||
[(0, 0), (4, 0), (0, 4)],
|
||||
# [2] upwardy triangle:
|
||||
# [2] upwardly triangle:
|
||||
[(2, 0), (4, 4), (0, 4)],
|
||||
# [3] left half of square, standing rectangle:
|
||||
[(0, 0), (2, 0), (2, 4), (0, 4)],
|
||||
|
|
|
@ -13,7 +13,7 @@ class TestConfig(unittest.TestCase):
|
|||
"""A test case for bmconfigparser"""
|
||||
|
||||
def test_safeGet(self):
|
||||
"""safeGet retuns provided default for nonexistent option or None"""
|
||||
"""safeGet returns provided default for nonexistent option or None"""
|
||||
self.assertIs(
|
||||
BMConfigParser().safeGet('nonexistent', 'nonexistent'), None)
|
||||
self.assertEqual(
|
||||
|
@ -32,7 +32,7 @@ class TestConfig(unittest.TestCase):
|
|||
'nonexistent', 'nonexistent', True)
|
||||
|
||||
def test_safeGetInt(self):
|
||||
"""safeGetInt retuns provided default for nonexistent option or 0"""
|
||||
"""safeGetInt returns provided default for nonexistent option or 0"""
|
||||
self.assertEqual(
|
||||
BMConfigParser().safeGetInt('nonexistent', 'nonexistent'), 0)
|
||||
self.assertEqual(
|
||||
|
|
|
@ -80,7 +80,7 @@ class UPnPError(Exception):
|
|||
|
||||
|
||||
class Router: # pylint: disable=old-style-class
|
||||
"""Encapulate routing"""
|
||||
"""Encapsulate routing"""
|
||||
name = ""
|
||||
path = ""
|
||||
address = None
|
||||
|
|
Loading…
Reference in New Issue
Block a user