diff --git a/src/communicatorutils/netcheck.py b/src/communicatorutils/netcheck.py index 7f731e75..d7aaace4 100755 --- a/src/communicatorutils/netcheck.py +++ b/src/communicatorutils/netcheck.py @@ -23,11 +23,14 @@ from utils import netutils from onionrutils import localcommand, epoch from . import restarttor def net_check(comm_inst): - '''Check if we are connected to the internet or not when we can't connect to any peers''' - rec = False # for detecting if we have received incoming connections recently + '''Check if we are connected to the internet + or not when we can't connect to any peers''' + # for detecting if we have received incoming connections recently + rec = False if len(comm_inst.onlinePeers) == 0: try: - if (epoch.get_epoch() - int(localcommand.local_command('/lastconnect'))) <= 60: + if (epoch.get_epoch() - int(localcommand.local_command + ('/lastconnect'))) <= 60: comm_inst.isOnline = True rec = True except ValueError: