diff --git a/src/yapsut/template_subs.py b/src/yapsut/template_subs.py index 703bff51b03a9cbe3166fc7c5e992a60027fc398..f024b16fc824bc867cd06835673ff0b05f159b4b 100644 --- a/src/yapsut/template_subs.py +++ b/src/yapsut/template_subs.py @@ -23,7 +23,9 @@ def discoverKeys(template,kbraeket,verbose=False) : except : raise Exception('file ended while scanning end of keyword') if verbose : print(i1,i2) - out.append(template[i1:i2+1]) + kkk=template[i1:i2+1] + if not kkk in out : + out.append(kkk) i1=i2+1 return out @@ -108,7 +110,7 @@ class templateFiller: if not self.isfilled() : raise Exception('Error, not all the keywords are filled') # - tout=template + tout=self._t for ik,k in enumerate(self._k) : keyName=self._kfill[ik] tout=tout.replace(keyName,self._d[k])