@@ -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 ):
@@ -197,7 +197,7 @@ def make_reltoroot(roots, args):
197197 parts [0 ] = root .basename + "/" + x
198198 break
199199 else :
200- raise ValueError ("arg %s not relative to an rsync root" % (arg , ))
200+ raise ValueError ("arg {} not relative to an rsync root" . format (arg ))
201201 result .append (splitcode .join (parts ))
202202 return result
203203
@@ -232,7 +232,7 @@ def __init__(self, nodemanager, gateway, config, putevent):
232232 py .log .setconsumer (self .log ._keywords , None )
233233
234234 def __repr__ (self ):
235- return "<%s %s>" % (self .__class__ .__name__ , self .gateway .id )
235+ return "<{} {}>" . format (self .__class__ .__name__ , self .gateway .id )
236236
237237 @property
238238 def shutting_down (self ):
@@ -292,11 +292,11 @@ def shutdown(self):
292292
293293 def sendcommand (self , name , ** kwargs ):
294294 """ send a named parametrized command to the other side. """
295- self .log ("sending command %s (**%s)" % (name , kwargs ))
295+ self .log ("sending command {} (**{})" . format (name , kwargs ))
296296 self .channel .send ((name , kwargs ))
297297
298298 def notify_inproc (self , eventname , ** kwargs ):
299- self .log ("queuing %s (**%s)" % (eventname , kwargs ))
299+ self .log ("queuing {} (**{})" . format (eventname , kwargs ))
300300 self .putevent ((eventname , kwargs ))
301301
302302 def process_from_remote (self , eventcall ): # noqa too complex
@@ -318,7 +318,7 @@ def process_from_remote(self, eventcall): # noqa too complex
318318 return
319319 eventname , kwargs = eventcall
320320 if eventname in ("collectionstart" ,):
321- self .log ("ignoring %s(%s)" % (eventname , kwargs ))
321+ self .log ("ignoring {}({})" . format (eventname , kwargs ))
322322 elif eventname == "workerready" :
323323 self .notify_inproc (eventname , node = self , ** kwargs )
324324 elif eventname == "workerfinished" :
@@ -358,7 +358,7 @@ def process_from_remote(self, eventcall): # noqa too complex
358358 item = kwargs ["item" ],
359359 )
360360 else :
361- raise ValueError ("unknown event: %s" % (eventname , ))
361+ raise ValueError ("unknown event: {}" . format (eventname ))
362362 except KeyboardInterrupt :
363363 # should not land in receiver-thread
364364 raise
0 commit comments