--- cdli/cdli_files.py 2009/09/01 08:36:04 1.114 +++ cdli/cdli_files.py 2010/03/19 14:01:41 1.115 @@ -90,7 +90,7 @@ class CDLIFileObject(CatalogAware,extVer def getPNumber(self): """get the pnumber""" try: - txt=re.match("&[Pp](\d*)\s*=([^\r\n]*)",self.getData()[0:]) + txt=re.match("&[PpSs](\d*)\s*=([^\r\n]*)",self.getData()[0:]) except: txt=self.getData()[0:] @@ -104,7 +104,7 @@ class CDLIFileObject(CatalogAware,extVer def getDesignation(self): """get the designation out of the file""" try: - txt=re.match("&[Pp](\d*)\s*=([^\r\n]*)",self.getData()[0:]) + txt=re.match("&[PpSs](\d*)\s*=([^\r\n]*)",self.getData()[0:]) except: txt=self.getData()[0:] @@ -318,8 +318,8 @@ def checkFile(filename,data,folder): # first check the file name fn=filename.split(".") # no extension - if not fn[0][0]=="P": - return False,"P missing in the filename" + if not (fn[0][0]=="P" or fn[0][0]=="S"): + return False,"P/S missing in the filename" elif len(fn[0])!=7: return False,"P number has not the right length 6" elif not checkUTF8(data): @@ -1000,7 +1000,7 @@ class CDLIRoot(Folder): if line.lstrip().startswith('#lem:'): continue # ignore p-num line - if line.startswith('&P'): + if line.startswith('&P') or line.startswith('&S'): continue # ignore version lines if line.startswith('#version'): @@ -1091,9 +1091,6 @@ class CDLIRoot(Folder): lv.author=user lv.versionComment="XXXXXXX" - - - gen def forceunlock(self,REQUEST=None,user=None,fid=None): "break all locks" if fid is not None: @@ -1317,9 +1314,6 @@ class CDLIRoot(Folder): def uploadATFfinally(self,procedure='',comment="",basketname='',unlock=None,repeat=None,RESPONSE=None): """nowupload the files""" - - - threadName=repeat if not threadName or threadName=="": thread=uploadATFfinallyThread()