def get_result_path(timestamp): """Retrieves the associated file path for a result file for a timestamp.""" return os.path.join( _RESULT_FILE_DIR, _UPDATE_RESULT_FILENAME_FORMAT % iso8601.to_string(timestamp))
def default(self, obj): if isinstance(obj, datetime.datetime): return iso8601.to_string(obj) return obj