r252789 - imsvdex/trunk/imsvdex
"Tom Gross" <svn-changes-z4DKO/[email protected]> Tue, 27 May 2014 10:18:17 +0000 (UTC)
| Newsgroups | gmane.comp.web.zope.plone.collective.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: tom_gross
Date: Tue May 27 10:18:17 2014
New Revision: 252789
Modified:
imsvdex/trunk/imsvdex/vdex.py
Log:
fixed some errors found by pyflakes
Modified: imsvdex/trunk/imsvdex/vdex.py
==============================================================================
--- imsvdex/trunk/imsvdex/vdex.py (original)
+++ imsvdex/trunk/imsvdex/vdex.py Tue May 27 10:18:17 2014
@@ -26,7 +26,6 @@
from lxml import etree
VDEX_FLAT_PROFILE_TYPES = ('thesaurus', 'glossaryOrDictionary', 'flatTokenTerms')
-TRUE_VALUES = ('1', 'true', 'True', 'yes', 'Yes')
FALSE_VALUES = ('', '0', 'false', 'False', 'no', 'No')
class VDEXError(Exception):
@@ -182,7 +181,7 @@
"""
this is not declared in VDEX vocabs, so we return false
"""
- return false
+ return False
def getVocabularyDict(self, lang=None):
"""
@@ -313,7 +312,7 @@
# not needed here
if not nsname[:1] == "{":
return nsname
- namespace_uri, tagname = string.split(name[1:], "}", 1)
+ namespace_uri, tagname = string.split(nsname[1:], "}", 1)
return tagname
def nsTag(self, namespace, tagname):
@@ -455,8 +454,8 @@
if not hasattr(languages, cell[8:]):
languages.append(cell[8:])
else:
- raise AttributeErro("Data is not valid, languages "
- "may not appear twice!")
+ raise AttributeError("Data is not valid, languages "
+ "may not appear twice!")
else:
raise AttributeError("Data is not valid, after Description"
" must come a new Caption")
@@ -490,7 +489,7 @@
parent = parents[row_depth-1]
term = addSubElem(parent, 'term')
parents[row_depth] = term
- termIdentifier = addSubElem(term, 'termIdentifier', row[row_depth])
+ addSubElem(term, 'termIdentifier', row[row_depth])
captions = [row[x] for x in range(len(parents)-1, len(row), 2)]
descriptions = [row[x] for x in range(len(parents), len(row), 2)]
if filter(lambda x:x,captions):
------------------------------------------------------------------------------
The best possible search technologies are now affordable for all companies.
Download your FREE open source Enterprise Search Engine today!
Our experts will assist you in its installation for $59/mo, no commitment.
Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk