def readxml(self, uri, tmpDir='/tmp', sha1sum=False, compress=None, sign=None):
     uri = File.make_uri(uri)
     localpath = File.download(uri, tmpDir,sha1sum=sha1sum,compress=compress,sign=sign)
     try:
         self.doc = NoExtDtdReader.parseUri(Ft.Lib.Uri.OsPathToUri(localpath))
         return self.doc.documentElement
     except Ft.FtException, e:
         raise Error(_("File '%s' has invalid XML: %s") % (localpath, str(e)) )
Exemple #2
0
    def readxml(self, uri, tmpDir="/tmp"):
        uri = File.make_uri(uri)
        localpath = File.download(uri, tmpDir)

        try:
            self.doc = mdom.parse(localpath)
        except ExpatError, inst:
            raise Error(_("File '%s' has invalid XML: %s\n") % (fileName, str(inst)))
 def readxml(self, uri, tmpDir = '/tmp'):
     uri = File.make_uri(uri)
     localpath = File.download(uri, tmpDir)
     try:
         self.doc = ParsePath(localpath)
         return self.doc.documentElement
     except Ft.FtException, e:
         raise Error(_("File '%s' has invalid XML: %s") % (localpath, str(e)) )
 def readxml(self, uri, tmpDir='/tmp', sha1sum=False, compress=None, sign=None):
     uri = File.make_uri(uri)
     localpath = File.download(uri, tmpDir,sha1sum=sha1sum,compress=compress,sign=sign)
     try:
         self.doc = iks.parse(localpath)
         return self.doc
     except Exception, e:
         raise Error(_("File '%s' has invalid XML") % (localpath) )
Exemple #5
0
 def readxml(self, uri, tmpDir="/tmp"):
     uri = File.make_uri(uri)
     localpath = File.download(uri, tmpDir)
     try:
         self.doc = NoExtDtdReader.parseUri(Ft.Lib.Uri.OsPathToUri(localpath))
         return self.doc.documentElement
     except Ft.FtException, e:
         raise Error(_("File '%s' has invalid XML: %s") % (localpath, str(e)))
Exemple #6
0
    def readxml(self, uri, tmpDir='/tmp'):
        uri = File.make_uri(uri)
        localpath = File.download(uri, tmpDir)

        try:
            self.doc = mdom.parse(localpath)
        except ExpatError, inst:
            raise Error(
                _("File '%s' has invalid XML: %s\n") % (fileName, str(inst)))
Exemple #7
0
 def readxml(self, uri, tmpDir="/tmp", sha1sum=False, compress=None, sign=None, copylocal=False):
     uri = File.make_uri(uri)
     # try:
     localpath = File.download(uri, tmpDir, sha1sum=sha1sum, compress=compress, sign=sign, copylocal=copylocal)
     # except IOError, e:
     #    raise Error(_("Cannot read URI %s: %s") % (uri, unicode(e)) )
     try:
         self.doc = iks.parse(localpath)
         return self.doc
     except Exception, e:
         raise Error(_("File '%s' has invalid XML") % (localpath))
Exemple #8
0
 def readxml(self,
             uri,
             tmpDir='/tmp',
             sha1sum=False,
             compress=None,
             sign=None):
     uri = File.make_uri(uri)
     localpath = File.download(uri,
                               tmpDir,
                               sha1sum=sha1sum,
                               compress=compress,
                               sign=sign)
     try:
         self.doc = NoExtDtdReader.parseUri(
             Ft.Lib.Uri.OsPathToUri(localpath))
         return self.doc.documentElement
     except Ft.FtException, e:
         raise Error(
             _("File '%s' has invalid XML: %s") % (localpath, str(e)))
Exemple #9
0
 def readxml(self,
             uri,
             tmpDir='/tmp',
             sha1sum=False,
             compress=None,
             sign=None,
             copylocal=False):
     uri = File.make_uri(uri)
     #try:
     localpath = File.download(uri,
                               tmpDir,
                               sha1sum=sha1sum,
                               compress=compress,
                               sign=sign,
                               copylocal=copylocal)
     #except IOError, e:
     #    raise Error(_("Cannot read URI %s: %s") % (uri, unicode(e)) )
     try:
         self.doc = iks.parse(localpath)
         return self.doc
     except Exception, e:
         raise Error(_("File '%s' has invalid XML") % (localpath))
Exemple #10
0
 def download(self, uri, transferdir):
     # fix auth info and download
     uri = File.make_uri(uri)
     File.download(uri, transferdir)
Exemple #11
0
 def download(self, uri, transferdir):
     # fix auth info and download
     uri = File.make_uri(uri)
     if self.authinfo:
         uri.set_auth_info(self.authinfo)
     File.download(uri, transferdir)
Exemple #12
0
 def download(self, uri, transferdir):
     # fix auth info and download
     uri = File.make_uri(uri)
     File.download(uri, transferdir)