def upload(self, image, name=None, max_chunk_size=None, max_attempts=5):
        if not os.path.exists(image):
            raise AzureStorageFileNotFound(image % 'File %s not found')
        blob_service = PageBlobService(
            self.account_name,
            self.account_key,
            endpoint_suffix=self.blob_service_host_base
        )

        image_type = FileType(image)
        blob_name = (name or image_type.basename())
        if not name:
            log.info('blob-name: %s', blob_name)
        image_size = self.__upload_byte_size(image, image_type)

        try:
            stream = self.__open_upload_stream(image, image_type)
        except Exception as e:
            raise AzureStorageStreamError(
                '%s: %s' % (type(e).__name__, format(e))
            )
        try:
            page_blob = PageBlob(
                blob_service, blob_name, self.container, image_size
            )
            self.__upload_status(0, image_size)
            while True:
                bytes_transfered = page_blob.next(
                    stream, max_chunk_size, max_attempts
                )
                self.__upload_status(bytes_transfered, image_size)
        except StopIteration:
            stream.close()
            self.__upload_status(image_size, image_size)
        except Exception as e:
            stream.close()
            raise AzureStorageUploadError(
                '%s: %s' % (type(e).__name__, format(e))
            )
dataset/ETHPy150Open SUSE/azurectl/azurectl/storage/storage.py/Storage.upload/swapped operands of `%`