def __init__(self,
                 provider=None,
                 key=None,
                 secret=None,
                 container=None,
                 allowed_extensions=None,
                 app=None,
                 **kwargs):

        if app:
            self.init_app(app)

        if provider:
            if allowed_extensions:
                self.allowed_extensions = allowed_extensions

            kwparams = {
                "key": key,
                "secret": secret
            }

            if "local" in provider.lower():
                kwparams["key"] = container
                container = ""

            kwparams.update(kwargs)

            self.driver = get_driver_class(provider)(**kwparams)
            if not isinstance(self.driver, StorageDriver):
                raise AttributeError("Invalid Driver")

            self.container = self.driver.get_container(container)
Common checks for restricted command file system directories and files.
dataset/ETHPy150Open mardix/flask-cloudy/flask_cloudy.py/Storage.__init__--crossover with--dataset/ETHPy150Open ganeti/ganeti/lib/backend.py/_CommonRestrictedCmdCheck