How to use the s3contents.s3fs.S3FSError function in s3contents

To help you get started, we’ve selected a few s3contents examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github danielfrg / s3contents / s3contents / s3fs.py View on Github external
def abspath(self, path):
        """Utility: Return a normalized absolutized version of the pathname path
        Basically prepends the path with the prefix
        """
        path = path.strip("/")
        if self.prefix:
            path = self.join(self.prefix, path)
        return path.strip("/")


class S3FSError(Exception):
    pass


class NoSuchFile(S3FSError):

    def __init__(self, path, *args, **kwargs):
        super(NoSuchFile, self).__init__(*args, **kwargs)
        self.path = path