better checking for empty string on replace

This commit is contained in:
Sanj 2012-02-21 03:08:42 +05:30
parent c1e6bf36e9
commit 43fd99fae9

View File

@ -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'],