~ubuntu-branches/ubuntu/quantal/m2crypto/quantal

« back to all changes in this revision

Viewing changes to M2Crypto/SSL/Checker.py

  • Committer: Bazaar Package Importer
  • Author(s): Dima Barsky
  • Date: 2007-05-24 21:14:36 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070524211436-73w3oonappxy8k4a
Tags: 0.17-1
* New upstream release
* Acknowledge NMU (Closes: #380861)
* Changed section to python (Closes: #425875)

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        self.fieldName = fieldName
41
41
        
42
42
    def __str__(self):
43
 
        return 'Peer certificate %s does not match host, expected %s, got %s' \
 
43
        s = 'Peer certificate %s does not match host, expected %s, got %s' \
44
44
               % (self.fieldName, self.expectedHost, self.actualHost)
 
45
        if isinstance(s, unicode):
 
46
            s = s.encode('utf8')
 
47
        return s
45
48
 
46
49
 
47
50
class Checker: