Changeset 3140 for WAeUP_SRP/base
- Timestamp:
- 10 Feb 2008, 16:56:16 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r3139 r3140 2083 2083 imported_fn = "%s/import/%ss_pending_imported%s.csv" % (i_home,name,current) 2084 2084 not_imported_fn = "%s/import/%ss_pending_not_imported%s.csv" % (i_home,name,current) 2085 if not os.path.exists(pending_fn): 2086 em = 'No %s' % os.path.split(pending_fn) 2087 return em 2085 2088 attrs = csv.reader(open(pending_fn,"rb")).next() 2086 2089 else: … … 2215 2218 if error: 2216 2219 item['Error'] = error 2217 if id and id not in pending_records.keys(): 2218 item['id'] = id 2219 pending_records[id] = item 2220 msg = format_error % item 2221 logger.info("%(id)s added to pending %(msg)s" % vars()) 2222 new_imports_pending += 1 2220 if id: 2221 if id not in pending_records.keys(): 2222 item['id'] = id 2223 pending_records[id] = item 2224 msg = format_error % item 2225 logger.info("%(id)s added to pending %(msg)s" % vars()) 2226 new_imports_pending += 1 2227 else: 2228 logger.info("%(id)s already in pending %(msg)s" % vars()) 2223 2229 continue 2224 2230 else: … … 2256 2262 pending_csv_writer.writerows(pending_records.values()) 2257 2263 total_pending += len(pending_records) 2264 import_source_fn = os.path.split(import_source_fn)[1] 2258 2265 msg = "Finished importing in %(mode)s mode from %(import_source_fn)s: " % vars() 2259 2266 msg += "%(total_imported)d imported, %(total_not_imported)d not imported " % vars()
Note: See TracChangeset for help on using the changeset viewer.