From 7c9770d137b8853b195f729563ac80e4d589a3c7 Mon Sep 17 00:00:00 2001 From: coffeedogs Date: Tue, 15 May 2018 15:32:31 +0100 Subject: [PATCH] Fixed: Addressed more comments from PR --- fabfile/README.md | 9 +++++---- src/bitmessageqt/__init__.py | 12 +++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/fabfile/README.md b/fabfile/README.md index 663165dd..3d4d41be 100644 --- a/fabfile/README.md +++ b/fabfile/README.md @@ -29,10 +29,11 @@ Furthermore, you can use -- to run arbitrary shell commands rather than tasks: # Getting started - * Install Fabric, fabric-virtualenv, virtualenvwrapper system-wide (log in to a new terminal afterwards if you're installing - virtualenvwrappers for the first time) - $ sudo apt install Fabric virtualenvwrapper; sudo pip install fabric-virtualenv - Create a virtualenv called pybitmessage and install fabfile/requirements.txt + * Install [Fabric](http://docs.fabfile.org/en/1.14/usage/fab.html), + [fabric-virtualenv](https://pypi.org/project/fabric-virtualenv/) and + [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/) + system-wide using your preferred method. + * Create a virtualenv called pybitmessage and install fabfile/requirements.txt $ mkvirtualenv -r fabfile/requirements.txt --system-site-packages pybitmessage-devops * Ensure you can ssh localhost with no intervention, which may include: * ssh [sshd_config server] and [ssh_config client] configuration diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index c2220817..c1b8bd66 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -643,8 +643,8 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth if addressVersionNumber == 1: displayMsg = _translate( "MainWindow", - ('One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer ' - 'supported. May we delete it now?')).arg(addressInKeysFile) + 'One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer ' + 'supported. May we delete it now?').arg(addressInKeysFile) reply = QtGui.QMessageBox.question( self, 'Message', displayMsg, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) if reply == QtGui.QMessageBox.Yes: @@ -1042,8 +1042,8 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth else: totalUnread[row[1]] = row[2] queryReturn = sqlQuery( - ("SELECT fromaddress, folder, COUNT(msgid) AS cnt FROM inbox " - "WHERE read = 0 AND toaddress = ? GROUP BY fromaddress, folder"), + "SELECT fromaddress, folder, COUNT(msgid) AS cnt FROM inbox " + "WHERE read = 0 AND toaddress = ? GROUP BY fromaddress, folder", str_broadcast_subscribers) broadcastsUnread = {} for row in queryReturn: @@ -1091,7 +1091,7 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth if sortingEnabled: tableWidget.setSortingEnabled(False) tableWidget.insertRow(0) - for i, item in enumerate(items): + for i, _ in enumerate(items): tableWidget.setItem(0, i, items[i]) if sortingEnabled: tableWidget.setSortingEnabled(True) @@ -2097,6 +2097,8 @@ class MyForm(settingsmixin.SMainWindow): # pylint: disable=too-many-public-meth """ TBC + Regarding the line below `if len(message) > (2 ** 18 - 500):`: + The whole network message must fit in 2^18 bytes. Let's assume 500 bytes of overhead. If someone wants to get that too an exact number you are welcome to but I think that it would