From cd3bbc3cb60f8ebb5b119b50151c6c2159a96537 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 29 Sep 2016 10:35:47 +0200 Subject: [PATCH] ping local nodes without beeing online --- oml/__main__.py | 2 +- oml/nodes.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/oml/__main__.py b/oml/__main__.py index 58241e9..f7112f3 100644 --- a/oml/__main__.py +++ b/oml/__main__.py @@ -9,7 +9,7 @@ if sys.platform == 'win32': from os.path import normpath, dirname, abspath, join import site base = normpath(dirname(dirname(dirname(abspath(__file__))))) - for site_packages in ( + for site_packages in ( join(base, 'openmedialibrary'), join(base, 'platform', 'Shared', 'lib', 'python3.4', 'site-packages'), join(base, 'platform_win32', 'Lib', 'site-packages'), diff --git a/oml/nodes.py b/oml/nodes.py index 3c14323..5db4912 100644 --- a/oml/nodes.py +++ b/oml/nodes.py @@ -66,7 +66,7 @@ class Node(Thread): #return Thread.join(self) def ping(self): - if state.online: + if state.online or self.get_local(): self._q.put('ping') @property @@ -195,7 +195,7 @@ class Node(Thread): return False 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): self._q.put('send_response')