Changeset 3319 for WAeUP_SRP/base/Upload.py
- Timestamp:
- 11 Mar 2008, 15:59:01 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/Upload.py
r3316 r3319 15 15 from WAeUPImport import DepartmentImport,FacultyImport,StudentImport,VerdictImport 16 16 from WAeUPImport import NO_KEY,IGNORE 17 17 18 18 import logging 19 19 import csv,re,os … … 80 80 else: 81 81 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() 83 83 else: 84 84 reader = csv.reader(open(csv_path,"rb")) … … 86 86 values = reader.next() 87 87 if "import_mode" not in headline: 88 msg += ' import_mode must be in heading'88 msg += '+ import_mode must be in heading +' 89 89 invalid_keys = importer.checkHeadline(headline) 90 90 if invalid_keys: 91 msg += " invalid keys in heading"91 msg += "+ invalid keys in heading +" 92 92 err,keys = importer.getHeadlineFields(headline,values) 93 93 if err: … … 95 95 return msg,keys 96 96 ###) 97 97 98 98 security.declareProtected(View,"getFields") ###( 99 99 def getKeys(self): … … 105 105 return keys 106 106 ###) 107 107 108 108 security.declareProtected(View,"getUploadFileInfo") ###( 109 109 def getUploadFileInfo(self): … … 112 112 return os.stat(os.path.join(storage_path,doc.filename)) 113 113 ###) 114 114 115 115 security.declareProtected(ModifyPortalContent,"editHeadline") ###( 116 116 def editHeadline(self,key_pairs): … … 129 129 writer.writerow(headline) 130 130 writer.writerows(records) 131 132 131 132 133 133 InitializeClass(Upload) 134 134
Note: See TracChangeset for help on using the changeset viewer.