@@ -101,7 +101,7 @@ def _getrsyncdirs(self):
101101 for root in candidates :
102102 root = py .path .local (root ).realpath ()
103103 if not root .check ():
104- raise pytest .UsageError ("rsyncdir doesn't exist: %r" % (root , ))
104+ raise pytest .UsageError ("rsyncdir doesn't exist: {!r}" . format (root ))
105105 if root not in roots :
106106 roots .append (root )
107107 return roots
@@ -179,7 +179,7 @@ def _report_send_file(self, gateway, modified_rel_path):
179179 if self ._verbose :
180180 path = os .path .basename (self ._sourcedir ) + "/" + modified_rel_path
181181 remotepath = gateway .spec .chdir
182- print ("%s:%s <= %s" % (gateway .spec , remotepath , path ))
182+ print ("{}:{} <= {}" . format (gateway .spec , remotepath , path ))
183183
184184
185185def make_reltoroot (roots , args ):
@@ -198,7 +198,7 @@ def make_reltoroot(roots, args):
198198 parts [0 ] = root .basename + "/" + x
199199 break
200200 else :
201- raise ValueError ("arg %s not relative to an rsync root" % (arg , ))
201+ raise ValueError ("arg {} not relative to an rsync root" . format (arg ))
202202 result .append (splitcode .join (parts ))
203203 return result
204204
@@ -233,7 +233,7 @@ def __init__(self, nodemanager, gateway, config, putevent):
233233 py .log .setconsumer (self .log ._keywords , None )
234234
235235 def __repr__ (self ):
236- return "<%s %s>" % (self .__class__ .__name__ , self .gateway .id )
236+ return "<{} {}>" . format (self .__class__ .__name__ , self .gateway .id )
237237
238238 @property
239239 def shutting_down (self ):
@@ -293,11 +293,11 @@ def shutdown(self):
293293
294294 def sendcommand (self , name , ** kwargs ):
295295 """ send a named parametrized command to the other side. """
296- self .log ("sending command %s (**%s)" % (name , kwargs ))
296+ self .log ("sending command {} (**{})" . format (name , kwargs ))
297297 self .channel .send ((name , kwargs ))
298298
299299 def notify_inproc (self , eventname , ** kwargs ):
300- self .log ("queuing %s (**%s)" % (eventname , kwargs ))
300+ self .log ("queuing {} (**{})" . format (eventname , kwargs ))
301301 self .putevent ((eventname , kwargs ))
302302
303303 def process_from_remote (self , eventcall ): # noqa too complex
@@ -319,7 +319,7 @@ def process_from_remote(self, eventcall): # noqa too complex
319319 return
320320 eventname , kwargs = eventcall
321321 if eventname in ("collectionstart" ,):
322- self .log ("ignoring %s(%s)" % (eventname , kwargs ))
322+ self .log ("ignoring {}({})" . format (eventname , kwargs ))
323323 elif eventname == "workerready" :
324324 self .notify_inproc (eventname , node = self , ** kwargs )
325325 elif eventname == "workerfinished" :
@@ -359,7 +359,7 @@ def process_from_remote(self, eventcall): # noqa too complex
359359 item = kwargs ["item" ],
360360 )
361361 else :
362- raise ValueError ("unknown event: %s" % (eventname , ))
362+ raise ValueError ("unknown event: {}" . format (eventname ))
363363 except KeyboardInterrupt :
364364 # should not land in receiver-thread
365365 raise
0 commit comments