Ignore non matching patterns for report command.
Non matching datetime pattern directory entries are skipped.
This commit is contained in:
parent
03fcffb3bf
commit
8ed104616a
2 changed files with 7 additions and 5 deletions
|
@ -5,6 +5,7 @@ Changelog
|
|||
* Exception: No braces means author == Nico Schottelius
|
||||
|
||||
Next:
|
||||
* Ignore non matching patterns for report command (Darko Poljak)
|
||||
* Added -s, --summary option (Darko Poljak)
|
||||
* No args error (Darko Poljak)
|
||||
* Report project name as file path basename (Darko Poljak)
|
||||
|
|
|
@ -169,7 +169,8 @@ class Report(object):
|
|||
try:
|
||||
dir_datetime = datetime.datetime.strptime(dirname, ctt.DISKFORMAT)
|
||||
except ValueError:
|
||||
raise ctt.Error("Invalid time entry {entry} for project {project}, aborting!".format(entry=dirname, project=self.project))
|
||||
log.warning("Invalid time entry {entry} for project {project}, skipping.".format(entry=dirname, project=self.project))
|
||||
continue
|
||||
|
||||
if dir_datetime >= self.start_date and dir_datetime <= self.end_date:
|
||||
filename = os.path.join(self.project_dir, dirname, ctt.FILE_DELTA)
|
||||
|
|
Loading…
Reference in a new issue