@@ -171,7 +171,7 @@ def doStashCpSingle(sourceFile, destination, debug=False):
171171
172172 else :
173173 logging .debug ("CVMFS File does not exist" )
174-
174+
175175 if not check_for_xrootd ():
176176 return download_with_http (sourceFile , destination , debug )
177177
@@ -283,35 +283,35 @@ def check_for_xrootd():
283283 else :
284284 logging .debug ("xrdcp command returned exit code: %i" , command_object .returncode )
285285 return False
286-
286+
287287
288288def download_with_http (source , destination , debug ):
289289 """
290290 Download from the nearest cache with HTTP
291291 """
292292 global nearest_cache
293293 logging .debug ("Downloading with HTTP" )
294-
294+
295295 payload = {}
296296 payload ['filename' ] = source
297297 sitename = os .environ .setdefault ("OSG_SITE_NAME" , "siteNotFound" )
298298 payload ['sitename' ] = sitename
299299 payload .update (parse_job_ad ())
300300 # Calculate the starting time
301301 start = int (time .time ()* 1000 )
302-
302+
303303 if not nearest_cache :
304304 nearest_cache = get_best_stashcache ()
305-
305+
306306 # Parse the nearest_cache url, make sure it uses http
307307 # Should really use urlparse, but python3 and python2 urlparse imports are
308308 # very different
309309 if nearest_cache .startswith ('root://' ):
310310 nearest_cache = nearest_cache .replace ('root://' , 'http://' )
311-
311+
312312 # Append port 8000, which is just a convention for now, not set in stone
313313 nearest_cache += ":8000"
314-
314+
315315 # Ok, now run the curl command:
316316 if debug :
317317 output_mode = "-v"
@@ -324,7 +324,7 @@ def download_with_http(source, destination, debug):
324324 dest_dir , dest_filename = os .path .split (destination )
325325 if not dest_dir :
326326 dest_dir = "."
327-
327+
328328 if dest_filename :
329329 download_output = "-o %s" % dest_filename
330330 final_destination = destination
@@ -361,7 +361,7 @@ def download_with_http(source, destination, debug):
361361 return 0
362362 else :
363363 return 1
364-
364+
365365
366366def parse_job_ad ():
367367 """
0 commit comments