Some fixes in ProcessorAliasDef

dev-linux
Ivan Maslov 4 years ago
parent 1d12d59e8c
commit d9cd7b0581

@ -349,15 +349,16 @@ def GSettingsKeyListValueOperatorPlus(inGSettings, inValue, inKeyList=None): # O
return True
# Create alias for def (can be used in ActivityItem in field Def)
# return Alias str
def ProcessorAliasDefCreate(inGSettings, inDef, inAliasStr=None):
lL = inGSettings["Logger"]
if inAliasStr is None: inAliasStr = str(inDef)
# Check if key is not exists
if inAliasStr not in inGSettings["ProcessorDict"]["AliasDefDict"]:
inGSettings["ProcessorDict"]["AliasDefDict"][inAliasStr]=inDef
else:
if lL: lL.warning(f"Orchestrator.ProcessorAliasDefCreate: Alias {inAliasStr} already exists in Alias dictionary.")
if inAliasStr in inGSettings["ProcessorDict"]["AliasDefDict"]:
inAliasStr = str(inDef)
if lL: lL.warning(f"Orchestrator.ProcessorAliasDefCreate: Alias {inAliasStr} already exists in alias dictionary. Another alias will be generated and returned")
inGSettings["ProcessorDict"]["AliasDefDict"][inAliasStr] = inDef
return inAliasStr
# Add Activity item in Processor list
def ProcessorActivityItemAppend(inGSettings, inDef, inArgList=None, inArgDict=None, inArgGSettingsStr=None, inArgLoggerStr=None):
if inArgList is None: inArgList=[]

Loading…
Cancel
Save