Commit 6b9fe392 authored by sumpfralle's avatar sumpfralle

don't try to get statistics, if the server is not enabled


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@771 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 572a93cc
......@@ -1468,10 +1468,12 @@ class ProjectGui:
not is_available)
self.gui.get_object("ProcessPoolStatisticsBox").set_visible(
is_available)
interval = int(max(1, self.gui.get_object(
"ProcessPoolRefreshInterval").get_value()))
gobject.timeout_add_seconds(interval,
self.update_process_pool_statistics, interval)
if is_available:
# start the refresh function
interval = int(max(1, self.gui.get_object(
"ProcessPoolRefreshInterval").get_value()))
gobject.timeout_add_seconds(interval,
self.update_process_pool_statistics, interval)
self.process_pool_window.show()
else:
self.process_pool_window.hide()
......
......@@ -65,7 +65,10 @@ def is_pool_available():
def get_pool_statistics():
global __manager
return __manager.statistics().get_worker_statistics()
if __manager is None:
return []
else:
return __manager.statistics().get_worker_statistics()
def init_threading(number_of_processes=None, enable_server=False, remote=None, run_server=False,
server_credentials=""):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment