From 2575b3efc48cb9f42c3105015284b9afd9c67625 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Thu, 29 Nov 2012 08:52:39 -0800 Subject: [PATCH] Fix #94 --- NEWS | 2 ++ paramiko/client.py | 3 +-- paramiko/config.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 0627ad8..2dba8e0 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,8 @@ v1.10.0 (DD MM YYYY) * #113: Add `timeout` parameter to `SSHClient.exec_command` for easier setting of the command's internal channel object's timeout. Thanks to Cernov Vladimir for the patch. +* #94: Remove duplication of SSH port constant. Thanks to Olle Lundberg for the + catch. v1.9.0 (6th Nov 2012) --------------------- diff --git a/paramiko/client.py b/paramiko/client.py index 97ae449..a777b45 100644 --- a/paramiko/client.py +++ b/paramiko/client.py @@ -28,6 +28,7 @@ import warnings from paramiko.agent import Agent from paramiko.common import * +from paramiko.config import SSH_PORT from paramiko.dsskey import DSSKey from paramiko.hostkeys import HostKeys from paramiko.resource import ResourceManager @@ -37,8 +38,6 @@ from paramiko.transport import Transport from paramiko.util import retry_on_signal -SSH_PORT = 22 - class MissingHostKeyPolicy (object): """ Interface for defining the policy that L{SSHClient} should use when the diff --git a/paramiko/config.py b/paramiko/config.py index 2828d90..d1ce949 100644 --- a/paramiko/config.py +++ b/paramiko/config.py @@ -25,7 +25,7 @@ import os import re import socket -SSH_PORT=22 +SSH_PORT = 22 proxy_re = re.compile(r"^(proxycommand)\s*=*\s*(.*)", re.I)