From a816442cde0a6e5b691d53af52dc0d32afb2360a Mon Sep 17 00:00:00 2001 From: Alan Post Date: Tue, 14 Sep 2010 18:50:20 +0200 Subject: [PATCH] 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. --- makfa/patches/02-pyexpat.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 makfa/patches/02-pyexpat.patch diff --git a/makfa/patches/02-pyexpat.patch b/makfa/patches/02-pyexpat.patch new file mode 100644 index 0000000..9996124 --- /dev/null +++ b/makfa/patches/02-pyexpat.patch @@ -0,0 +1,20 @@ +diff --git a/makfa b/makfa +index 488007e..ab66740 100755 +--- a/makfa ++++ b/makfa +@@ -8,7 +8,6 @@ import re + import sys + import textwrap + import urllib +-import xml.etree.cElementTree as etree + + + +@@ -486,6 +485,7 @@ class Type(Command): + class Updater(object): + + def __init__(self, lang='en', filename='/var/lib/makfa/makfa.dump'): ++ import xml.etree.cElementTree as etree + self.db = {'order': [], 'entries': {}} + url = 'http://jbovlaste.lojban.org/export/xml-export.html?lang=%s' + tree = etree.parse(urllib.urlopen(url % lang))