Changeset 3162
- Timestamp:
- 14 Feb 2008, 08:04:50 (17 years ago)
- Location:
- WAeUP_SRP/base
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r3161 r3162 2096 2096 em = 'No %s' % os.path.split(pending_fn) 2097 2097 return em 2098 attrs = csv.reader(open(pending_fn,"rb")).next()2099 2098 else: 2100 2099 import_source_fn = "%s/import/%s.csv" % (i_home,filename) 2101 2100 imported_fn = "%s/import/%s_imported%s.csv" % (i_home,filename,current) 2102 2101 not_imported_fn = "%s/import/%s_not_imported%s.csv" % (i_home,filename,current) 2103 attrs = csv.reader(open(import_source_fn,"rb")).next() 2102 if not os.path.exists(import_source_fn): 2103 em = 'No %s' % os.path.split(import_soure_fn) 2104 return em 2105 attrs = csv.reader(open(import_source_fn,"rb")).next() 2104 2106 import_keys = [k.strip() for k in attrs if not (k.strip().startswith('ignore') 2105 2107 or k.strip() == 'Error')] -
WAeUP_SRP/base/skins/waeup_default/get_csv_names.py
r2282 r3162 7 7 files = context.waeup_tool.get_csv_filenames() 8 8 if key is None: 9 l = [(f[:-4],f) for f in files] 9 if files: 10 l = [(f[:-4],f) for f in files] 11 else: 12 l = [] 13 l.insert(0,('--','without new data')) 10 14 l.sort(cmp=lambda x,y: cmp(x[0].lower(), y[0].lower())) 11 15 return l 12 16 13 return files[files.index("%s.csv" % key)] 14 17 if "%s.csv" % key in files: 18 return files[files.index("%s.csv" % key)] 19 return ('--','without new data')
Note: See TracChangeset for help on using the changeset viewer.