Commit 41c21e07 authored by Wout De Nolf's avatar Wout De Nolf
Browse files

MachInfo metadata property for backward compatibility (deprecation warning)

parent 7c216c28
......@@ -8,6 +8,7 @@ import enum
import gevent
import functools
from tabulate import tabulate
import warnings
from bliss import global_map
from bliss.config.beacon_object import BeaconObject
......@@ -186,6 +187,22 @@ class MachInfo(BeaconObject, HasMetadataForScan, HasMetadataForDataset):
meta_dict["message"] = attributes["SR_Operator_Mesg"]
return meta_dict
@BeaconObject.property()
def metadata(self):
"""
Insert machine info metadata's for any scans
"""
pass
@metadata.setter
def metadata(self, flag):
if flag:
warnings.warn("Use 'MachInfo.enable_scan_metadata' instead", FutureWarning)
self.enable_scan_metadata()
else:
warnings.warn("Use 'MachInfo.disable_scan_metadata' instead", FutureWarning)
self.disable_scan_metadata()
def iter_wait_for_refill(self, checktime, waittime=0., polling_time=1.):
"""
Helper for waiting the machine refill.
......
Supports Markdown
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