Date:2010-09-14 18:50:20 (13 years 6 months ago)
Author:Alan Post
Commit:a816442cde0a6e5b691d53af52dc0d32afb2360a
Message:pyexpat is only used when updating, move import inside class.

Update is not intended to be used on Ben NanoNote, so I'm moving the
import of pyexpat to the Updater class. pyexpat is not included in
the default build, and this patch saves me from having to install
it.

I will in the future include pyexpat and enable full support for
generating new dump files, but this patch will still function in
that case.
Files: makfa/patches/02-pyexpat.patch (1 diff)

Change Details

makfa/patches/02-pyexpat.patch
1diff --git a/makfa b/makfa
2index 488007e..ab66740 100755
3--- a/makfa
4@@ -8,7 +8,6 @@ import re
5 import sys
6 import textwrap
7 import urllib
8-import xml.etree.cElementTree as etree
9
10
11
12@@ -486,6 +485,7 @@ class Type(Command):
13 class Updater(object):
14
15     def __init__(self, lang='en', filename='/var/lib/makfa/makfa.dump'):
16+ import xml.etree.cElementTree as etree
17         self.db = {'order': [], 'entries': {}}
18         url = 'http://jbovlaste.lojban.org/export/xml-export.html?lang=%s'
19         tree = etree.parse(urllib.urlopen(url % lang))

Archive Download the corresponding diff file



interactive