ping local nodes without beeing online

This commit is contained in:
j 2016-09-29 10:35:47 +02:00
parent f66e0fbb15
commit cd3bbc3cb6
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ if sys.platform == 'win32':
from os.path import normpath, dirname, abspath, join from os.path import normpath, dirname, abspath, join
import site import site
base = normpath(dirname(dirname(dirname(abspath(__file__))))) base = normpath(dirname(dirname(dirname(abspath(__file__)))))
for site_packages in ( for site_packages in (
join(base, 'openmedialibrary'), join(base, 'openmedialibrary'),
join(base, 'platform', 'Shared', 'lib', 'python3.4', 'site-packages'), join(base, 'platform', 'Shared', 'lib', 'python3.4', 'site-packages'),
join(base, 'platform_win32', 'Lib', 'site-packages'), join(base, 'platform_win32', 'Lib', 'site-packages'),

View file

@ -66,7 +66,7 @@ class Node(Thread):
#return Thread.join(self) #return Thread.join(self)
def ping(self): def ping(self):
if state.online: if state.online or self.get_local():
self._q.put('ping') self._q.put('ping')
@property @property
@ -195,7 +195,7 @@ class Node(Thread):
return False return False
def is_online(self): def is_online(self):
return self.online or self.get_local() != None return self.online or self.get_local() is not None
def send_response(self): def send_response(self):
self._q.put('send_response') self._q.put('send_response')