Pylint corrections and documentation.

svn: r10513
This commit is contained in:
Zsolt Foldvari 2008-04-06 20:54:29 +00:00
parent f30d524f4d
commit 7bbd735421

View File

@ -34,7 +34,7 @@ _LOG = logging.getLogger(".GrampsAboutDialog")
try:
from xml.sax import make_parser, handler, SAXParseException
except:
except ImportError:
from _xmlplus.sax import make_parser, handler, SAXParseException
@ -87,7 +87,7 @@ class GrampsAboutDialog(gtk.AboutDialog):
ifile = open(const.LICENSE_FILE, "r")
self.set_license(ifile.read().replace('\x0c', ''))
ifile.close()
except:
except IOError:
self.set_license("License file is missing")
self.set_comments(_(const.COMMENTS))
@ -125,16 +125,14 @@ class AuthorParser(handler.ContentHandler):
self.text = ""
def startElement(self, tag, attrs):
"""
"""
"""Override default method, handle the start of an element."""
if tag == "author":
self.uid = attrs['uid']
self.title = attrs['title']
self.text = ""
def endElement(self, tag):
"""
"""
"""Override default method, handle the end of an element."""
if tag == "author":
if (self.title == 'author' and
self.text not in self.author_list):
@ -144,8 +142,7 @@ class AuthorParser(handler.ContentHandler):
self.contributor_list.append(self.text.strip())
def characters(self, chunk):
"""
"""
"""Override default method, receive notification of character data."""
if chunk != '\n':
self.text += chunk