Projet

Général

Profil

0001-backoffice-show-old-style-class-name-in-inspect-1911.patch

Benjamin Dauvergne, 04 mars 2019 14:54

Télécharger (1,17 ko)

Voir les différences:

Subject: [PATCH] backoffice: show old-style class name in inspect (#19111)

 wcs/backoffice/management.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
wcs/backoffice/management.py
2397 2397
            r += htmltext('<li><code title="%s">%s</code>') % (k, k)
2398 2398
            r += htmltext('  <div class="value"><span>%s</span>') % ellipsize(safe(v), 10000)
2399 2399
            if not isinstance(v, basestring):
2400
                r += htmltext(' <span class="type">(%r)</span>') % type(v)
2400
                if type(v) == v.__class__:
2401
                    klass = '%r' % type(v)
2402
                else:  # old-style class
2403
                    klass = '<class %s>' % v.__class__
2404
                r += htmltext(' <span class="type">(%s)</span>') % klass
2401 2405
            r += htmltext('</div></li>')
2402 2406
        r += htmltext('</div>')
2403 2407

  
2404
-