File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 11import argparse
22import gzip
3+ import io
34import json
45import os
56import re
67import shutil
78import sys
89import textwrap
9- import urllib .request
1010from pathlib import Path
1111
1212import requests
@@ -673,13 +673,17 @@ def compare_apt_repo_versions(previous_version, current_version):
673673
674674
675675def _get_package_list (gardenlinux_version ):
676- (path , headers ) = urllib .request .urlretrieve (
677- f"https://packages.gardenlinux.io/gardenlinux/dists/{ gardenlinux_version } /main/binary-amd64/Packages.gz"
678- )
679- with gzip .open (path , "rt" ) as f :
680- d = DebsrcFile ()
681- d .read (f )
682- return d
676+ url = f"https://packages.gardenlinux.io/gardenlinux/dists/{ gardenlinux_version } /main/binary-amd64/Packages.gz"
677+ response = requests .get (url , timeout = REQUESTS_TIMEOUTS )
678+ response .raise_for_status ()
679+
680+ d = DebsrcFile ()
681+
682+ with io .BytesIO (response .content ) as buf :
683+ with gzip .open (buf , "rt" ) as f :
684+ d .read (f )
685+
686+ return d
683687
684688
685689def create_github_release_notes (gardenlinux_version , commitish ):
You can’t perform that action at this time.
0 commit comments