Changeset 9632 for src/django_gheat
- Timestamp:
- Aug 30, 2011, 7:05:10 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/gheat/management/commands/import_datafile.py
r9631 r9632 66 66 def process_date(datestr): 67 67 for strptime in strptime_choices: 68 try: return datetime.datetime.strptime(datestr,strptime) 69 except ValueError: pass 70 # Start nagging we cannot parse the entries 71 raise CommandError("Invalid date '%s', options: %s" % (datestr, strptime_choices)) 68 try: 69 return datetime.datetime.strptime(datestr,strptime) 70 except ValueError: 71 pass 72 logger.error("Invalid date '%s', options: %s, using: now()", datestr, strptime_choices) 73 return datetime.datetime.now() 72 74 73 75
Note:
See TracChangeset
for help on using the changeset viewer.