Browse Source

Fix work ini function with removed values.

develop
Mike Hiretsky 10 years ago
parent
commit
a3b508528a
  1. 7
      pym/cl_template.py

7
pym/cl_template.py

@ -3019,7 +3019,10 @@ or 'lower' or 'capitalize'"))
self.currDictIni.update(self.prevDictIni)
self.timeIni = self.getTimeFile(self.fileConfigIni)
if nameLocVar in self.currDictIni.keys():
replace = self.currDictIni[nameLocVar].encode("UTF-8")
if self.currDictIni[nameLocVar] is None:
replace = ""
else:
replace = self.currDictIni[nameLocVar].encode("UTF-8")
elif len(terms) == 2:
if self.timeIni != curTime:
# читаем переменные из файла
@ -3047,6 +3050,8 @@ or 'lower' or 'capitalize'"))
self.timeIni = self.getTimeFile(self.fileConfigIni)
if nameLocVar in self.currDictIni.keys():
unicodeValue = self.currDictIni[nameLocVar]
if unicodeValue is None:
unicodeValue = ""
if terms[2] in ('url', 'purl'):
replace = unicodeValue.encode("UTF-8").\
__repr__()[1:-1].replace('\\x','%').\

Loading…
Cancel
Save