@@ -52,7 +52,10 @@ def verbose(msg):
52
52
53
53
with ExitStack ()as stack :
54
54
verbose (f"== Fetching PEP artifact from{ settings .PEP_ARTIFACT_URL } " )
55
- temp_file = self .get_artifact_tarball (stack ,verbose )
55
+ temp_file = self .get_artifact_tarball (stack )
56
+ if not temp_file :
57
+ verbose ("== No update to artifacts, we're done here!" )
58
+ return
56
59
temp_dir = stack .enter_context (TemporaryDirectory ())
57
60
tar_ball = stack .enter_context (TarFile .open (fileobj = temp_file ,mode = 'r:gz' ))
58
61
tar_ball .extractall (path = temp_dir ,numeric_owner = False )
@@ -117,7 +120,7 @@ def verbose(msg):
117
120
118
121
verbose ("== Finished" )
119
122
120
- def get_artifact_tarball (self ,stack , verbose ):
123
+ def get_artifact_tarball (self ,stack ):
121
124
artifact_url = settings .PEP_ARTIFACT_URL
122
125
if not artifact_url .startswith (('http://' ,'https://' )):
123
126
return stack .enter_context (open (artifact_url ,'rb' ))
@@ -126,7 +129,6 @@ def get_artifact_tarball(self, stack, verbose):
126
129
with requests .get (artifact_url ,stream = True )as r :
127
130
artifact_last_modified = parsedate (r .headers ['last-modified' ])
128
131
if peps_last_updated > artifact_last_modified :
129
- verbose (f"== No update to artifacts, we're done here!" )
130
132
return
131
133
132
134
temp_file = stack .enter_context (TemporaryFile ())