def get_path(self):
        path = ''
        upload_path = app.config.get('UPLOAD_PATH')

        if not upload_path:
            raise NoUploadPathConfigError()

        _artist = app.config.get('UPLOAD_DEFAULT_ARTIST', '')
        _album = app.config.get('UPLOAD_DEFAULT_ALBUM', '')

        artist = slugify(self.mdma.artist) or _artist
        album = slugify(self.mdma.album) or _album

        path = os.path.join(upload_path, artist, album)

        try:
            os.makedirs(path)
        except __HOLE__:  # File exists
            pass

        return path
dataset/ETHPy150Open tooxie/shiva-server/shiva/resources/upload.py/UploadHandler.get_path