From c11ec2e711eca70c79474bf5014c79b057f662b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Thu, 17 Nov 2005 00:07:05 +0000 Subject: [PATCH] fix: sane error reporting --- pisi/pxml/xmlfilecdom.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pisi/pxml/xmlfilecdom.py b/pisi/pxml/xmlfilecdom.py index beca979f..510a24e7 100644 --- a/pisi/pxml/xmlfilecdom.py +++ b/pisi/pxml/xmlfilecdom.py @@ -30,6 +30,7 @@ __trans = gettext.translation('pisi', fallback=True) _ = __trans.ugettext import codecs +import exceptions import Ft from Ft.Xml.Domlette import implementation @@ -70,6 +71,8 @@ class XmlFile(object): return self.doc.documentElement except Ft.FtException, e: raise Error(_("File '%s' has invalid XML: %s") % (path, str(e)) ) + except exceptions.ValueError, e: + raise Error(_("File '%s' not found") % path ) def writexml(self, path): f = file(path, 'w')