@@ -242,22 +242,22 @@ def _fetchLocalMedia(self, mediapath):
242242
243243 # Make sure we detect _a_ distro
244244 hvmstore = self ._getStore (fetcher , mediapath , "hvm" , arch )
245- logging .debug ("Local distro detected as: %s" % hvmstore )
245+ logging .debug ("Local distro detected as: %s" , hvmstore )
246246 finally :
247247 fetcher .cleanupLocation ()
248248
249249
250250 def _fetchFromURLDict (self , distname , url , arch , distro_info , check_xen ):
251- logging .debug ("\n Distro='%s' arch='%s' url=%s" % \
252- ( distname , arch , url ) )
251+ logging .debug ("\n Distro='%s' arch='%s' url=%s" ,
252+ distname , arch , url )
253253
254254 fetcher = OSDistro ._fetcherForURI (url , "/tmp" )
255255 try :
256256 fetcher .prepareLocation ()
257257 except Exception , e :
258258 # Don't raise an error here: the site might be down atm
259- logging .error ("%s-%s: Couldn't access url %s: %s. Skipping." % \
260- ( distname , arch , fetcher .location , str (e ) ))
259+ logging .error ("%s-%s: Couldn't access url %s: %s. Skipping." ,
260+ distname , arch , fetcher .location , str (e ))
261261 fetcher .cleanupLocation ()
262262 return
263263
@@ -303,8 +303,8 @@ def _grabURLMedia(self, fetcher, distname, url, arch, distro_info,
303303 exp_store = distroClass (distname )
304304 for s in [hvmstore , xenstore ]:
305305 if s and not isinstance (s , exp_store ):
306- logging .error ("(%s): expected store %s, was %s" % \
307- ( distname , exp_store , s ) )
306+ logging .error ("(%s): expected store %s, was %s" ,
307+ distname , exp_store , s )
308308 self .fail ()
309309
310310 # Make sure the stores are reporting correct distro name/variant
@@ -318,7 +318,7 @@ def fakeAcquireFile(filename, meter):
318318 if not isinstance (meter , urlgrabber .progress .BaseMeter ):
319319 raise ValueError ("passed meter is '%s' not an"
320320 " actual meter." % meter )
321- logging .debug ("Fake acquiring %s" % filename )
321+ logging .debug ("Fake acquiring %s" , filename )
322322 return fetcher .hasFile (filename )
323323
324324 # Replace acquireFile with hasFile, so we don't actually have to fetch
@@ -328,47 +328,47 @@ def fakeAcquireFile(filename, meter):
328328 # Fetch boot iso
329329 try :
330330 if re .match (r"%s" % NOBOOTISO_FILTER , distname ):
331- logging .debug ("Known lack of boot.iso in %s tree. Skipping." \
332- % distname )
331+ logging .debug ("Known lack of boot.iso in %s tree. Skipping." ,
332+ distname )
333333 else :
334334 boot = hvmstore .acquireBootDisk (testguest , fetcher , self .meter )
335- logging .debug ("acquireBootDisk: %s" % str (boot ))
335+ logging .debug ("acquireBootDisk: %s" , str (boot ))
336336
337337 if boot != True :
338338 raise RuntimeError ("Didn't fetch any boot iso." )
339339 except Exception , e :
340- logging .exception ("%s-%s: bootdisk fetching: %s" %
341- ( distname , arch , str (e ) ))
340+ logging .exception ("%s-%s: bootdisk fetching: %s" ,
341+ distname , arch , str (e ))
342342 self .fail ()
343343
344344 # Fetch regular kernel
345345 try :
346346 kern = hvmstore .acquireKernel (testguest , fetcher , self .meter )
347- logging .debug ("acquireKernel (hvm): %s" % str (kern ))
347+ logging .debug ("acquireKernel (hvm): %s" , str (kern ))
348348
349349 if kern [0 ] is not True or kern [1 ] is not True :
350350 raise RuntimeError ("Didn't fetch any hvm kernel." )
351351 except Exception , e :
352- logging .exception ("%s-%s: hvm kernel fetching: %s" %
353- ( distname , arch , str (e ) ))
352+ logging .exception ("%s-%s: hvm kernel fetching: %s" ,
353+ distname , arch , str (e ))
354354 self .fail ()
355355
356356 # Fetch xen kernel
357357 try :
358358 if xenstore and check_xen :
359359 kern = xenstore .acquireKernel (testguest , fetcher , self .meter )
360- logging .debug ("acquireKernel (xen): %s" % str (kern ))
360+ logging .debug ("acquireKernel (xen): %s" , str (kern ))
361361
362362 if kern [0 ] is not True or kern [1 ] is not True :
363363 raise RuntimeError ("Didn't fetch any xen kernel." )
364364 else :
365365 logging .debug ("acquireKernel (xen): Hardcoded skipping." )
366366 except Exception , e :
367367 if re .match (r"%s" % EXPECT_XEN_FAIL , distname ):
368- logging .debug ("%s: anticipated xen failure." % distname )
368+ logging .debug ("%s: anticipated xen failure." , distname )
369369 else :
370- logging .exception ("%s-%s: xen kernel fetching: %s" %
371- ( distname , arch , str (e ) ))
370+ logging .exception ("%s-%s: xen kernel fetching: %s" ,
371+ distname , arch , str (e ))
372372 self .fail ()
373373
374374 def _getStore (self , fetcher , url , _type , arch ):
@@ -379,7 +379,7 @@ def _getStore(self, fetcher, url, _type, arch):
379379 arch = arch , typ = _type )
380380 except Exception , e :
381381 if str (e ).count ("502" ):
382- logging .debug ("Caught proxy error: %s" % str (e ))
382+ logging .debug ("Caught proxy error: %s" , str (e ))
383383 time .sleep (.5 )
384384 continue
385385 raise
@@ -397,7 +397,7 @@ def testURLFetch(self):
397397 for label in keys :
398398 distro_info = None
399399 if MATCH_FILTER and not re .match (r"%s" % MATCH_FILTER , label ):
400- logging .debug ("Excluding '%s' from exclude filter." % label )
400+ logging .debug ("Excluding '%s' from exclude filter." , label )
401401 continue
402402
403403 check_xen = not bool (urls [label ].get ("noxen" ))
@@ -430,7 +430,7 @@ def testLocalMedia(self):
430430 try :
431431 self ._fetchLocalMedia (p )
432432 except Exception , e :
433- logging .exception ("Local path '%s' failed: %s" % ( p , e ) )
433+ logging .exception ("Local path '%s' failed: %s" , p , e )
434434 print "Local path FAILED."
435435 assertions += 1
436436
0 commit comments