Skip to content

shared/packet: Remove print when get_packet is called #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions shared/packet.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ def get_packet_file_path():
def fetch_packet():
if settings.SPONSORSHIP_PACKET_FILE and settings.SPONSORSHIP_PACKET_URL:
if not os.path.exists(get_packet_file_path()):
print("Downloading the sponsorship packet to: {}", get_packet_file_path())

r = requests.get(settings.SPONSORSHIP_PACKET_URL, stream=True)
if r.status_code == 200:
with open(get_packet_file_path(), 'wb') as f:
for chunk in r.iter_content(1024):
f.write(chunk)
f.write(chunk)