# HG changeset patch # User laurent # Date 1321633999 -3600 # Node ID 85dad46ae0f648c3e147c444ad3106a63085d7ce # Parent 865c7c60a1f38ef94abbb8fefdbe86a6b2606e16 Fixing bug that prevent to use global variables in configuration diff -r 865c7c60a1f3 -r 85dad46ae0f6 plugger.py --- a/plugger.py Fri Nov 18 17:32:57 2011 +0100 +++ b/plugger.py Fri Nov 18 17:33:19 2011 +0100 @@ -1298,7 +1298,11 @@ # Split and Maps each field to dictionnary entries attrs = dict(zip(VariablesListAttributeName,line.strip().split(';'))) # Truncate "C_path" to remove conf an ressources names - attrs["C_path"] = '__'.join(attrs["C_path"].split(".",2)[1:]) + parts = attrs["C_path"].split(".",2) + if len(parts) > 2: + attrs["C_path"] = '__'.join(parts[1:]) + else: + attrs["C_path"] = '__'.join(parts) # Push this dictionnary into result. self._VariablesList.append(attrs) # Fill in IEC<->C translation dicts