--- OSAS/OSA_system/OSAS_helpers.py 2004/04/15 20:48:01 1.7 +++ OSAS/OSA_system/OSAS_helpers.py 2004/04/15 21:30:42 1.8 @@ -20,12 +20,14 @@ def changeIndexMeta(argv,path,dirnames): if not argv['topbar']=='': subnodes['toptemplate']=argv['toptemplate'] - print path + try: - changeNodesInIndexMeta(path,"",subnodes) - urllib.urlopen("http://nausikaa2.rz-berlin.mpg.de:86/cgi-bin/toc/admin/reg.cgi?path=%s"%path).readlines() + changeNodesInIndexMeta(path,'',subnodes,parent='texttool') + except: print "ERROR (changeIndexMeta)",path + + urllib.urlopen("http://nausikaa2.rz-berlin.mpg.de:86/cgi-bin/toc/admin/reg.cgi?path=%s"%path).readlines() return "done" @@ -111,8 +113,11 @@ def changeNodesInIndexMeta(path,node,sub else: nodeOld=root.getElementsByTagName(node) - if nodeOld: # if yes -> delete it - root.removeChild(nodeOld[0]).unlink() + try: + if nodeOld: # if yes -> delete it + root.removeChild(nodeOld[0]).unlink() + except: + """nothing""" nodeNew=dom.createElement(node) # create new @@ -134,8 +139,10 @@ def changeNodesInIndexMeta(path,node,sub writefile=file(path+"/index.meta","w") writefile.write(dom.toxml().encode('utf-8')) writefile.close() - os.chmod(path+"/index.meta",0664) - + try: + os.chmod(path+"/index.meta",0664) + except: + """nothing"""