Skip to content
This repository was archived by the owner on Aug 15, 2023. It is now read-only.
This repository was archived by the owner on Aug 15, 2023. It is now read-only.

Images corrupted after downloading and extracting an archive #16

@robwilkerson

Description

@robwilkerson

I have a script that creates a new client project from a boilerplate repository. The first step in that process is to download an archive of the boilerplate repository. What I'm finding is that any downloaded images (gif, png) are corrupted after downloading and extracting the archive.

Here's a test script I was using to try to isolate the issue as best I could:

#!/usr/bin/env python

from bitbucket.bitbucket import Bitbucket
from zipfile import ZipFile

bitbucket = Bitbucket('robwilkerson', 'muhpassword')
repo = 'drupal-boilerplate'

success, result = bitbucket.repository.archive(
    repo,
    owner='theclient',
    format='zip')

with ZipFile(result, 'r') as archive:
    archive.extractall('/tmp/%s' % repo)

screen shot 2015-03-18 at 9 31 16 am

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions