fix for empty yesterday-file
This commit is contained in:
parent
57611fa5fc
commit
1795317d9c
1 changed files with 7 additions and 3 deletions
|
@ -95,7 +95,11 @@ class WorkdirFS(Operations):
|
|||
def _give_me_yesterday(self):
|
||||
if os.path.exists(self.configlast):
|
||||
with open(self.configlast, 'r') as fh:
|
||||
self.yesterday = datetime.strptime(fh.readline().strip(), "%Y-%m-%d")
|
||||
yesterday = fh.readline().strip()
|
||||
if self.yesterday == None:
|
||||
self.yesterday = self.today
|
||||
else:
|
||||
self.yesterday = datetime.strptime(yesterday, "%Y-%m-%d")
|
||||
else:
|
||||
self.yesterday = self.today
|
||||
self._checkdir(self.confdir)
|
||||
|
|
Loading…
Reference in a new issue