Browse Source

better checking for empty string on replace

master
Sanj 12 years ago
parent
commit
43fd99fae9
  1. 3
      utils.py

3
utils.py

@ -114,6 +114,9 @@ def replacePlaceNames(old, new, operator="", start=0, end=100):
value = m['value']
new_value = value.replace(old, new).strip()
if new_value = '':
log = "EMPTY VALUE: %s" % m['id']
logFile.write(log)
print log
continue
ret.append(api.editAnnotation({
'id': m['id'],

Loading…
Cancel
Save