version 1.12, 2005/10/10 18:11:11
|
version 1.13, 2007/01/31 14:30:30
|
Line 16 from urlparse import *
|
Line 16 from urlparse import *
|
import re |
import re |
import xml.dom.minidom |
import xml.dom.minidom |
from types import * |
from types import * |
import zLOG |
import logging |
|
|
|
#ersetzt logging |
|
def logger(txt,method,txt2): |
|
"""logging""" |
|
logging.info(txt+ txt2) |
|
|
|
|
import os.path |
import os.path |
import Globals |
import Globals |
from Globals import package_home |
from Globals import package_home |
Line 85 class OSAS_add_contextData(Folder):
|
Line 92 class OSAS_add_contextData(Folder):
|
return curHandler.retStr.encode('utf-8') |
return curHandler.retStr.encode('utf-8') |
|
|
except: |
except: |
zLOG.LOG('OSAS_Root (addFileToDollection)',zLOG.ERROR,'%s %s'%sys.exc_info()[:2]) |
logger('OSAS_Root (addFileToDollection)',logging.ERROR,'%s %s'%sys.exc_info()[:2]) |
return URL |
return URL |
return urllib.urlopen(URL).read() |
return urllib.urlopen(URL).read() |
|
|
Line 167 class OSAS_add_contextData(Folder):
|
Line 174 class OSAS_add_contextData(Folder):
|
server=xmlrpclib.Server(collection,allow_none=True) |
server=xmlrpclib.Server(collection,allow_none=True) |
retStr=server.addMovie(id,title,label,description,content_type,responsible,link,thumbUrl,rawFile,lowresFile,metalink,weight,credits) |
retStr=server.addMovie(id,title,label,description,content_type,responsible,link,thumbUrl,rawFile,lowresFile,metalink,weight,credits) |
except: |
except: |
zLOG.LOG('OSAS_Root (addFileToDollection2)',zLOG.ERROR,'%s %s'%sys.exc_info()[:2]) |
logger('OSAS_Root (addFileToDollection2)',logging.ERROR,'%s %s'%sys.exc_info()[:2]) |
return "An Error occured adding the resource\n", collection,params |
return "An Error occured adding the resource\n", collection,params |
|
|
#print "added" |
#print "added" |
Line 418 class OSAS_root(Folder,Implicit):
|
Line 425 class OSAS_root(Folder,Implicit):
|
|
|
dom=self.validateIndexMeta(xmlneu) |
dom=self.validateIndexMeta(xmlneu) |
if not dom: |
if not dom: |
zLOG.LOG('OSAS_Root (downloadExternalXML)',zLOG.ERROR,'cannot parse: %s', xml_url) |
logger('OSAS_Root (downloadExternalXML)',logging.ERROR,'cannot parse: %s', xml_url) |
return "error" |
return "error" |
|
|
|
|