From 6b2f82a7cdfa43c1a8424dc0507142b88c8e403d Mon Sep 17 00:00:00 2001 From: surbhi Date: Tue, 3 Jul 2018 19:30:19 +0530 Subject: [PATCH] Added suggested review changes for PR 1297 --- src/main.py | 2 +- src/mpybit.py | 27 +++++++-------------------- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/src/main.py b/src/main.py index a5bd9400..fbaab682 100644 --- a/src/main.py +++ b/src/main.py @@ -1,5 +1,5 @@ +"""This module is for thread start.""" from bitmessagemain import main -# import main method to run first for thread start. if __name__ == '__main__': main() diff --git a/src/mpybit.py b/src/mpybit.py index 5d2afeec..f2e422dc 100644 --- a/src/mpybit.py +++ b/src/mpybit.py @@ -1,18 +1,13 @@ -import threading - import time - from addresses import addBMIfNotPresent, decodeAddress from bmconfigparser import BMConfigParser from helper_ackPayload import genAckPayload - from helper_sql import sqlExecute - from kivy.app import App from kivy.core.window import Window from kivy.uix.boxlayout import BoxLayout @@ -27,25 +22,21 @@ class LoginScreen(BoxLayout): """This will use for sending message to recipents from mobile client.""" def send(self): - """Send used for sending message with title and body.""" + """This used for sending message with subject and body.""" queues.apiAddressGeneratorReturnQueue.queue.clear() streamNumberForAddress = 1 label = "CisDevelper" eighteenByteRipe = False nonceTrialsPerByte = 1000 payloadLengthExtraBytes = 1000 - print("BREAK POINT STARTING") - queues.addressGeneratorQueue.put( - ( - 'createRandomAddress', 4, - streamNumberForAddress, label, 1, - "", eighteenByteRipe, nonceTrialsPerByte, - payloadLengthExtraBytes - ) - ) + queues.addressGeneratorQueue.put(( + 'createRandomAddress', 4, + streamNumberForAddress, label, 1, + "", eighteenByteRipe, nonceTrialsPerByte, + payloadLengthExtraBytes + )) print(BMConfigParser().sections(), "BMConfigParser().sections()") fromAddress = queues.apiAddressGeneratorReturnQueue.get() - print("BREAK POINT ENDING") toAddress = "BM-2cWyUfBdY2FbgyuCb7abFZ49JYxSzUhNFe" message = self.ids.user_input.text subject = 'Test' @@ -86,14 +77,10 @@ class LoginScreen(BoxLayout): encoding, BMConfigParser().getint('bitmessagesettings', 'ttl')) queues.workerQueue.put(('sendmessage', toAddress)) - print("sqlExecute successfully ##### ##################") - for i in threading.enumerate(): - print(i.name) return None def sayexit(self): """This method will exit the application screen.""" - print("**************************EXITING FROM APPLICATION*****************************") shutdown.doCleanShutdown() Window.close()