Skip to content

Commit

Permalink
parent not always defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomrittervg committed Mar 30, 2012
1 parent b20f7d3 commit ce7332e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synonymmapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def getMap():
keyword = r[DB.keyword.keyword].lower()
keyword = keyword.replace(".", "\.") # Any regex metacharacters in the keyword need to be escaped.

parent = r[DB.keyword.parent].lower()
parent = parent.replace(".", "\.") # Any regex metacharacters in the parent also need to be escaped.
parent = r[DB.keyword.parent]
parent = parent.lower().replace(".", "\.") if parent else None

type = r[DB.keyword.type]

Expand Down

0 comments on commit ce7332e

Please sign in to comment.