Sat, 22 Oct 2016 17:09:08 +0200
Finished the refactoring of the Mercurial user config management code.
# -*- coding: utf-8 -*- # Copyright (c) 2016 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a dialog to edit a host fingerprint. """ from __future__ import unicode_literals from PyQt5.QtWidgets import QDialog from .Ui_HgUserConfigHostFingerprintDialog import \ Ui_HgUserConfigHostFingerprintDialog class HgUserConfigHostFingerprintDialog( QDialog, Ui_HgUserConfigHostFingerprintDialog): """ Class implementing a dialog to edit a host fingerprint. """ def __init__(self, parent=None, host="", fingerprint=""): """ Constructor @param parent reference to the parent widget @type QWidget @param host host name @type str @param fingerprint fingerprint for the host @type str """ super(HgUserConfigHostFingerprintDialog, self).__init__(parent) self.setupUi(self) self.hostEdit.setText(host) self.fingerprintEdit.setText(fingerprint) def getData(self): """ Public method to retrieve the data. @return tuple containig the host name and the fingerprint @rtype tuple of two str """ return ( self.hostEdit.text(), self.fingerprintEdit.text(), )