Ignore:
Timestamp:
11 Mar 2008, 15:59:01 (17 years ago)
Author:
Henrik Bettermann
Message:

further improvements: error strings are now seperated by '+'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/Upload.py

    r3316 r3319  
    1515from WAeUPImport import DepartmentImport,FacultyImport,StudentImport,VerdictImport
    1616from WAeUPImport import NO_KEY,IGNORE
    17  
     17
    1818import logging
    1919import csv,re,os
     
    8080            else:
    8181                base_path = os.path.split(csv_path)[1]
    82                 msg = 'No such file %(base_path)s' % vars()
     82                msg = '+ no such file %(base_path)s +' % vars()
    8383        else:
    8484            reader = csv.reader(open(csv_path,"rb"))
     
    8686            values = reader.next()
    8787            if "import_mode" not in headline:
    88                 msg += 'import_mode must be in heading'
     88                msg += '+ import_mode must be in heading +'
    8989            invalid_keys = importer.checkHeadline(headline)
    9090            if invalid_keys:
    91                 msg += "invalid keys in heading"
     91                msg += "+ invalid keys in heading +"
    9292            err,keys = importer.getHeadlineFields(headline,values)
    9393            if err:
     
    9595        return msg,keys
    9696    ###)
    97    
     97
    9898    security.declareProtected(View,"getFields") ###(
    9999    def getKeys(self):
     
    105105        return keys
    106106    ###)
    107    
     107
    108108    security.declareProtected(View,"getUploadFileInfo") ###(
    109109    def getUploadFileInfo(self):
     
    112112        return os.stat(os.path.join(storage_path,doc.filename))
    113113    ###)
    114    
     114
    115115    security.declareProtected(ModifyPortalContent,"editHeadline") ###(
    116116    def editHeadline(self,key_pairs):
     
    129129        writer.writerow(headline)
    130130        writer.writerows(records)
    131        
    132        
     131
     132
    133133InitializeClass(Upload)
    134134
Note: See TracChangeset for help on using the changeset viewer.