Commit 7c5afb47 authored by Jason Milhone's avatar Jason Milhone
Browse files

Add config properties

parent ba72c97e
......@@ -17,7 +17,6 @@ class DataModel:
@data.setter
def data(self, value):
print('setting data')
self._data = value
@property
......@@ -28,6 +27,18 @@ class DataModel:
def config(self, value):
self._config = value
@property
def server(self):
return self.config['setup']['server']
@property
def tree(self):
return self.config['setup']['tree']
@property
def mdsplus_event_name(self):
return self.config['setup']['event']
def subscribe_update_func(self, fn, registry='data'):
current_registry = self.update_registry[registry]
if fn not in current_registry:
......
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