Plugins/VcsPlugins/vcsMercurial/HgUserConfigHostFingerprintDialog.py

changeset 5588
6ba512d9f46a
parent 5441
cd5343be7d72
child 6048
82ad8ec9548c
--- a/Plugins/VcsPlugins/vcsMercurial/HgUserConfigHostFingerprintDialog.py	Tue Mar 07 18:53:18 2017 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgUserConfigHostFingerprintDialog.py	Tue Mar 07 19:46:57 2017 +0100
@@ -53,14 +53,14 @@
         if self.__version < (3, 9, 0):
             self.hashLabel.setEnabled(False)
             self.hashComboBox.setEnabled(False)
-            hash = "sha1"
+            hashType = "sha1"
         else:
             if fingerprint and fingerprint.startswith("sha"):
-                hash, fingerprint = fingerprint.split(":", 1)
+                hashType, fingerprint = fingerprint.split(":", 1)
             else:
-                hash = ""
+                hashType = ""
         
-        index = self.hashComboBox.findText(hash)
+        index = self.hashComboBox.findText(hashType)
         self.hashComboBox.setCurrentIndex(index)
         self.hostEdit.setText(host)
         self.fingerprintEdit.setText(fingerprint)
@@ -79,13 +79,13 @@
             bool(self.fingerprintEdit.text())
         )
         if self.__version >= (3, 9, 0):
-            hash = self.hashComboBox.currentText()
-            enabled &= bool(hash)
-            if hash:
+            hashType = self.hashComboBox.currentText()
+            enabled &= bool(hashType)
+            if hashType:
                 enabled &= (
                     len(self.fingerprintEdit.text().replace(":", "")) ==
-                    HgUserConfigHostFingerprintDialog.fingerprintLength[hash]
-                )
+                    HgUserConfigHostFingerprintDialog.fingerprintLength[
+                        hashType])
         
         self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enabled)
     
@@ -123,8 +123,8 @@
             self.fingerprintEdit.setText(txt)
         
         if txt.startswith(tuple(
-            [h + ":" for h in
-             HgUserConfigHostFingerprintDialog.supportedHashes])):
+            h + ":" for h in
+                HgUserConfigHostFingerprintDialog.supportedHashes)):
             parts = txt.split(":", 1)
             if len(parts) == 2:
                 self.fingerprintEdit.setText(parts[1])

eric ide

mercurial