Commit e7cc22cb authored by Hartmut Goebel's avatar Hartmut Goebel
Browse files

Remove '%' string formatting in logging everywhere.

This changes have been applied to all python files using fix
logging_mod_operator from https://github.com/htgoebel/pep8ify (branch
coherence-project) and the result has been checked.
parent 1976a06b
......@@ -121,7 +121,7 @@ class Cadre(log.Loggable):
continue
except (KeyError, TypeError):
pass
self.info("setting log-level for subsystem %s to %s" % (subsystem['name'], subsystem['level']))
self.info("setting log-level for subsystem %s to %s", subsystem['name'], subsystem['level'])
_debug.append('%s:%d' % (subsystem['name'].lower(), log.human2level(subsystem['level'])))
if len(_debug) > 0:
......@@ -191,7 +191,7 @@ class Cadre(log.Loggable):
reactor.stop()
def got_error(self, error):
self.warning("error %r" % error)
self.warning("error %r", error)
error.printTraceback()
def get_available_transitions(self):
......@@ -256,7 +256,7 @@ class Cadre(log.Loggable):
print "media_server_removed", udn
def state_variable_change(self, variable):
self.warning("state_variable %r changed from %r -> %r" % (variable.name, variable.old_value, variable.value))
self.warning("state_variable %r changed from %r -> %r", variable.name, variable.old_value, variable.value)
if variable.name == 'NextAVTransportURI':
if variable.value == '' and self.renderer.av_transport_server.get_variable('TransportState').value == 'TRANSITIONING':
d = defer.maybeDeferred(self.get_next_item)
......
......@@ -192,7 +192,7 @@ class CadreRenderer(log.Loggable):
self.playcontainer = [int(kw['StartingIndex']), uri, elt.getItems()[:], action, kw]
def browse_more(starting_index, number_returned, total_matches):
self.info("browse_more", starting_index, number_returned, total_matches)
self.info("browse_more %s %s %s", starting_index, number_returned, total_matches)
try:
def handle_error(r):
......@@ -207,9 +207,9 @@ class CadreRenderer(log.Loggable):
number_returned < (total_matches - starting_index)) and
(total_matches - number_returned) != starting_index):
self.info("seems we have been returned only a part of the result")
self.info("requested %d, starting at %d" % (5, starting_index))
self.info("got %d out of %d" % (number_returned, total_matches))
self.info("requesting more starting now at %d" % (starting_index + number_returned))
self.info("requested %d, starting at %d", 5, starting_index)
self.info("got %d out of %d", number_returned, total_matches)
self.info("requesting more starting now at %d", starting_index + number_returned)
self.playcontainer[4]['StartingIndex'] = str(starting_index + number_returned)
d = self.playcontainer[3].call(**self.playcontainer[4])
d.addCallback(handle_reply, starting_index + number_returned)
......
......@@ -249,7 +249,7 @@ class Canvas(log.Loggable):
self._transition_NONE()
def load_the_new_one(self, image, title):
self.warning("show image %r" % title)
self.warning("show image %r", title)
if image.startswith("file://"):
filename = image[7:]
else:
......@@ -261,7 +261,7 @@ class Canvas(log.Loggable):
os.close(fp)
remove_file_after_loading = True
#self.texture.set_load_async(True)
self.warning("loading image from file %r" % filename)
self.warning("loading image from file %r", filename)
self.in_texture.set_from_file(filename=filename)
self.in_texture.haz_image = True
self.set_title(title)
......
......@@ -72,7 +72,7 @@ class Canvas(log.Loggable):
self.out_texture, self.in_texture = self.in_texture, self.out_texture
def load_the_new_one(self, image, title):
self.warning("show image %r" % title)
self.warning("show image %r", title)
if image.startswith("file://"):
filename = image[7:]
else:
......@@ -83,7 +83,7 @@ class Canvas(log.Loggable):
os.write(fp, image)
os.close(fp)
remove_file_after_loading = True
self.warning("loading image from file %r" % filename)
self.warning("loading image from file %r", filename)
pic = pyglet.image.load(filename)
new_in_texture = pyglet.sprite.Sprite(pic, self.display_pos_x, self.height - self.display_height - 20)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment