mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-14 14:41:13 +02:00
2020-02-19 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug with the '%y' metadata wildcard where garbage would be returned if a valid year had not been set. * Added a 'metadata_wildcard_test' harness.
This commit is contained in:
@@ -122,7 +122,10 @@ class Update(object):
|
||||
if isinstance(self.__fields['padUpdate'][stype][sfield],str):
|
||||
string=string.replace('%'+wildcard,self.escape(self.__fields['padUpdate'][stype][sfield],esc))
|
||||
else:
|
||||
string=string.replace('%'+wildcard,str(self.__fields['padUpdate'][stype][sfield]))
|
||||
if self.__fields['padUpdate'][stype][sfield] is None:
|
||||
string=string.replace('%'+wildcard,'')
|
||||
else :
|
||||
string=string.replace('%'+wildcard,str(self.__fields['padUpdate'][stype][sfield]))
|
||||
except TypeError:
|
||||
string=string.replace('%'+wildcard,'')
|
||||
except KeyError:
|
||||
|
Reference in New Issue
Block a user