UniqueObject
create a class to be used for unique objects. better for debugging and documentation than just using object() + remove unused unique objects Change-Id: I32f65960ea2fbee4fccbeb49a4e11176b7185aa0 Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/27455 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
@ -31,9 +31,6 @@ from configparser import ConfigParser
|
||||
from os import environ, path
|
||||
|
||||
|
||||
unset_value = object()
|
||||
|
||||
|
||||
class GeneralConfig:
|
||||
def __init__(self):
|
||||
self._config = None
|
||||
@ -319,3 +316,11 @@ def formatStatusBits(sword, labels, start=0):
|
||||
if sword & (1 << i) and lbl:
|
||||
result.append(lbl)
|
||||
return result
|
||||
|
||||
|
||||
class UniqueObject:
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
|
||||
def __repr__(self):
|
||||
return 'UniqueObject(%r)' % self.name
|
||||
|
Reference in New Issue
Block a user