# HG changeset patch # User RhodeCode Admin # Date 2023-03-20 20:23:48 # Node ID 61cdb36d7370f536a438aecb02545ca777187148 # Parent 82d253bde1f251f6dfe9c976b9898127456c7e3f system-info: refactor func_name to prevent refactor diff --git a/rhodecode/lib/system_info.py b/rhodecode/lib/system_info.py --- a/rhodecode/lib/system_info.py +++ b/rhodecode/lib/system_info.py @@ -129,7 +129,7 @@ class SysInfoRes(object): class SysInfo(object): def __init__(self, func_name, **kwargs): - self.func_name = func_name + self.function_name = func_name self.value = _NA self.state = None self.kwargs = kwargs or {} @@ -140,14 +140,14 @@ class SysInfo(object): raise ValueError( 'computed value for {} is not instance of ' '{}, got {} instead'.format( - self.func_name, SysInfoRes, type(computed))) + self.function_name, SysInfoRes, type(computed))) return computed.__json__() def __str__(self): - return ''.format(self.func_name) + return ''.format(self.function_name) def compute(self, **kwargs): - return self.func_name(**kwargs) + return self.function_name(**kwargs) # SysInfo functions