Raise meaningful warning when translations.xml has invalid XML.

BUG:FIXED:8969
This commit is contained in:
Serdar Dalgıç
2009-12-09 12:25:29 +00:00
parent d43cb73a04
commit 479f10265b
2 changed files with 8 additions and 1 deletions
+4
View File
@@ -1,3 +1,7 @@
2009-12-09 Serdar Dalgıç <serdar@pardus.org.tr>
* pisi/specfile.py: Raise meaningful warning when translations.xml has
invalid XML, closes bug #8969
2009-12-08 Bahadır Kandemir <bahadir@pardus.org.tr>
* pisi/atomicoperations.py: Add package name to needs{Restart,Reboot}
list if an update requires one of these actions.
+4 -1
View File
@@ -318,7 +318,10 @@ class SpecFile(xmlfile.XmlFile):
def read_translations(self, path):
if not os.path.exists(path):
return
doc = piksemel.parse(path)
try:
doc = piksemel.parse(path)
except Exception, e:
raise Error(_("File '%s' has invalid XML") % (path) )
self._set_i18n(doc.getTag("Source"), self.source)
for pak in doc.tags("Package"):