cc-4105: fixed metadata formatting bug
This commit is contained in:
parent
6e9db647c1
commit
688d22e995
3 changed files with 11 additions and 9 deletions
|
@ -145,10 +145,11 @@ def remove_whitespace(dictionary):
|
|||
nd = copy.deepcopy(dictionary)
|
||||
bad_keys = []
|
||||
for k,v in nd.iteritems():
|
||||
stripped = v.strip()
|
||||
# ghetto and maybe unnecessary
|
||||
if stripped == '' or stripped == u'':
|
||||
bad_keys.append(k)
|
||||
if hasattr(v,'strip'):
|
||||
stripped = v.strip()
|
||||
# ghetto and maybe unnecessary
|
||||
if stripped == '' or stripped == u'':
|
||||
bad_keys.append(k)
|
||||
for bad_key in bad_keys: del nd[bad_key]
|
||||
return nd
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue