Diff for /OSAS/OSA_system/OSAS_Root.py between versions 1.20 and 1.22

version 1.20, 2006/02/14 17:42:37 version 1.22, 2007/01/31 14:28:04
Line 5  from OFS.Folder import Folder Line 5  from OFS.Folder import Folder
 from Products.PageTemplates.PageTemplateFile import PageTemplateFile  from Products.PageTemplates.PageTemplateFile import PageTemplateFile
 from Products.PageTemplates.PageTemplate import PageTemplate  from Products.PageTemplates.PageTemplate import PageTemplate
 import urllib  import urllib
   import urlparse
 import sys  import sys
 import zLOG  import logging
   
   #ersetzt logging
   def logger(txt,method,txt2):
       """logging"""
       logging.info(txt+ txt2)
   
   
 import re  import re
 import xml.dom.minidom  import xml.dom.minidom
 import os.path  import os.path
Line 107  class OSAS_Root(Folder,Implicit): Line 115  class OSAS_Root(Folder,Implicit):
     try:      try:
             xmlneu=urllib.urlopen(xml_url).read()              xmlneu=urllib.urlopen(xml_url).read()
     except:      except:
                 zLOG.LOG("OSASRoot (downloadExternalXML)", zLOG.INFO,"%s (%s)"%sys.exc_info()[0:2])                  logger("OSASRoot (downloadExternalXML)", logging.INFO,"%s (%s)"%sys.exc_info()[0:2])
                 zLOG.LOG("OSASRoot (downloadExternalXML)", zLOG.INFO,xml_url)                  logger("OSASRoot (downloadExternalXML)", logging.INFO,xml_url)
         return "error"          return "error"
         try:          try:
             dom=xml.dom.minidom.parseString(xmlneu)              dom=xml.dom.minidom.parseString(xmlneu)
Line 117  class OSAS_Root(Folder,Implicit): Line 125  class OSAS_Root(Folder,Implicit):
             return repr(xml_url)              return repr(xml_url)
             return "error"              return "error"
   
         path=re.sub(self.REQUEST['SERVER_URL'],'',index_meta_url)  
         path=re.sub('http://'+self.REQUEST['HTTP_HOST'],'',index_meta_url)  
   
         path=re.sub('http://foxridge.mpiwg-berlin.mpg.de:8080','',path) # falls foxridge als server      #TODO: direct access to the file system necessary, fix that also xmlrpc to the server where the index file is stored is possible    
         path=re.sub('http://foxridge.rz-berlin.mpg.de:8080','',path) # falls foxridge als server      parsedUrl=urlparse.urlparse(index_meta_url)
         path=re.sub('http://foxridge.rz-berlin.mpg.de','',path) # falls foxridge als server      path=parsedUrl[2]
   
         path=re.sub('http://foxridge.mpiwg-berlin.mpg.de','',path) # falls foxridge als server  
         path=re.sub('http://content.mpiwg-berlin.mpg.de','',path) # falls content als server  
         path=re.sub('http://vision.mpiwg-berlin.mpg.de','',path) # falls vision als server  
     path=re.sub('http://echo.mpiwg-berlin.mpg.de','',path) # falls echo  
 #   path=re.sub('//','/',path) # falls echo  
         fh=open(path,'w')          fh=open(path,'w')
     zLOG.LOG("OSAS",zLOG.INFO,path)      logger("OSAS",logging.INFO,path)
         fh.write(xmlneu)          fh.write(xmlneu)
         fh.close()          fh.close()
         return "ok"          return "ok"

Removed from v.1.20  
changed lines
  Added in v.1.22


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>