summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbladictionary.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/bladictionary.py b/bladictionary.py
index 936a75b..a64eb1c 100755
--- a/bladictionary.py
+++ b/bladictionary.py
@@ -6,7 +6,7 @@ import sys
import shlex
from lxml import etree
-version = "2.0.8b"
+version = "2.0.9b"
class Definition(object):
#ID is relative to the word type, eg noun 1, noun 2, verb 1, verb 2, not to the entire list
@@ -165,14 +165,13 @@ def parse_oed(word):
for line in file:
word_part = line.split(" ")[0]
- if word_part == word:
+ if word_part.lower() == word.lower():
word_line = line
break;
if word_line == "":
return
- print line
prev_part = ""
items = []
id = 0
@@ -224,6 +223,10 @@ def main():
num_more = 0
suppress_print = False
+ if items is None or len(items) == 0:
+ print "No definition found for "+word
+ return
+
for item in items:
if word_type is "" or word_type == item.word_type: