timestamp file in exists.
No issue #
Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@curii.com>
# SPDX-License-Identifier: AGPL-3.0
import argparse
+import errno
import functools
import glob
import locale
class TimestampFile:
def __init__(self, path):
self.path = path
+ # Make sure the dirname for `path` exists
+ p = os.path.dirname(path)
+ try:
+ os.makedirs(p)
+ except OSError as exc:
+ if exc.errno == errno.EEXIST and os.path.isdir(path):
+ pass
+ else:
+ raise
self.start_time = time.time()
def last_upload(self):