Commit 4a3c0c2c authored by Steve Borho's avatar Steve Borho
Browse files

sync: if ssl module is not present, do not offer fingerprint query

parent c32aa44bcf96
...@@ -10,7 +10,6 @@ import os ...@@ -10,7 +10,6 @@ import os
import re import re
import tempfile import tempfile
import urlparse import urlparse
import ssl
from PyQt4.QtCore import * from PyQt4.QtCore import *
from PyQt4.QtGui import * from PyQt4.QtGui import *
...@@ -1024,10 +1023,13 @@ are expanded in the filename.''')) ...@@ -1024,10 +1023,13 @@ are expanded in the filename.'''))
if hasattr(le, 'setPlaceholderText'): # Qt >= 4.7 if hasattr(le, 'setPlaceholderText'): # Qt >= 4.7
le.setPlaceholderText('### host certificate fingerprint ###') le.setPlaceholderText('### host certificate fingerprint ###')
hbox.addWidget(le) hbox.addWidget(le)
qb = QPushButton(_('Query')) try:
qb.clicked.connect(genfingerprint) import ssl # Python 2.6 or backport for 2.5
hbox.addWidget(qb) qb = QPushButton(_('Query'))
qb.clicked.connect(genfingerprint)
hbox.addWidget(qb)
except ImportError:
pass
BB = QDialogButtonBox BB = QDialogButtonBox
bb = QDialogButtonBox(BB.Help|BB.Save|BB.Cancel) bb = QDialogButtonBox(BB.Help|BB.Save|BB.Cancel)
......
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