fix NameError

authorAurelien Campeas <aurelien.campeas@logilab.fr>
changesetb87851e4b8ff
branchdefault
phasepublic
hiddenno
parent revision#9a48c3ce5e5e a few pylint fixes and copyright cleanups
child revision#ff86ccc61d36 closes #123892 by adding errors=replace when encoding unicode strings, #ae5fe13e4743 closes #123892 by adding errors=replace when encoding unicode strings
files modified by this revision
testutils.py
# HG changeset patch
# User Aurelien Campeas <aurelien.campeas@logilab.fr>
# Date 1365673542 -7200
# Thu Apr 11 11:45:42 2013 +0200
# Node ID b87851e4b8ff4913c87ff28bd46c770e921cd307
# Parent 9a48c3ce5e5e702800aba861c5ee8ed75af54961
fix NameError

diff --git a/testutils.py b/testutils.py
@@ -92,14 +92,14 @@
1 
2      def add_message(self, msg_id, location, msg):
3          """manage message of different type and in the context of path """
4          fpath, module, obj, line, _ = location
5          self.message_ids[msg_id] = 1
6 -        if object:
7 -            object = ':%s' % obj
8 +        if obj:
9 +            obj = ':%s' % obj
10          sigle = msg_id[0]
11 -        self.messages.append('%s:%3s%s: %s' % (sigle, line, object, msg))
12 +        self.messages.append('%s:%3s%s: %s' % (sigle, line, obj, msg))
13 
14      def finalize(self):
15          self.messages.sort()
16          for msg in self.messages:
17              print >> self.out, msg
revision of