From 43fd99fae9a19c21d239e40c4fe327f87fd4e4cf Mon Sep 17 00:00:00 2001 From: Sanj Date: Tue, 21 Feb 2012 03:08:42 +0530 Subject: [PATCH] better checking for empty string on replace --- utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils.py b/utils.py index 4b71a7c..34ade50 100644 --- a/utils.py +++ b/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'],