Changeset 36:b78fa8f898ea in stamper
- Timestamp:
- Aug 11, 2014, 8:24:13 AM (10 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
stamper/stamper.py
r32 r36 128 128 else: 129 129 # maybe they are giving us a fixed date 130 filter_from = datetime.strptime(stamp_filter, DATE_FORMAT) 131 filter_from = filter_from.replace(hour=0, minute=0, second=0) 132 filter_to = filter_from + timedelta(days=1) 130 try: 131 filter_from = datetime.strptime(stamp_filter, DATE_FORMAT) 132 except: 133 # nothing to be used as a filter, go on, printing a warning 134 print('[warning] invalid date filter: ' + stamp_filter) 135 else: 136 filter_from = filter_from.replace(hour=0, minute=0, second=0) 137 filter_to = filter_from + timedelta(days=1) 133 138 134 139 return filter_from, filter_to
Note:
See TracChangeset
for help on using the changeset viewer.