Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.1, 2.0.2, and 2.0.3

stable sync: catch exceptions from fingerprint query (closes #264)

Changeset 70cb77d81e05

Parent 85b9cb36649d

by Steve Borho

Changes to one file · Browse files at 70cb77d81e05 Showing diff from parent 85b9cb36649d Diff from another changeset...

 
1041
1042
1043
1044
1045
 
 
 
 
 
 
 
1046
1047
1048
 
1041
1042
1043
 
 
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
@@ -1041,8 +1041,13 @@
  super(SecureDialog, self).__init__(parent)     def genfingerprint(): - pem = ssl.get_server_certificate( (host, 443) ) - der = ssl.PEM_cert_to_DER_cert(pem) + try: + pem = ssl.get_server_certificate( (host, 443) ) + der = ssl.PEM_cert_to_DER_cert(pem) + except Exception, e: + qtlib.WarningMsgBox(_('Certificate Query Error'), + hglib.tounicode(str(e)), parent=self) + return   hash = util.sha1(der).hexdigest()   pretty = ":".join([hash[x:x + 2] for x in xrange(0, len(hash), 2)])   le.setText(pretty)