Newer
Older
import os
def validate_directory_exists(path):
return os.path.exists(path)
class SharedImageDirectory(object):
def __init__(self, path): # create at session startup, validate
self.path = path
if not validate_directory_exists(path):
raise InvalidDirectoryError(f'Invalid directory:\n{path}')
class InvalidDirectoryError(Exception):
pass