summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2007-02-26 20:25:16 +0000
committerChris Lumens <clumens@redhat.com>2007-02-26 20:25:16 +0000
commit1b76ce5fee64f229636cb125133d8911096dcaf7 (patch)
treedde8b5c42ad2842c946548feace39474a2b9ecdb
parentfc885e01912017efe3e2d8f1774b344fbf77dcc6 (diff)
downloadanaconda-1b76ce5fee64f229636cb125133d8911096dcaf7.tar.gz
anaconda-1b76ce5fee64f229636cb125133d8911096dcaf7.tar.xz
anaconda-1b76ce5fee64f229636cb125133d8911096dcaf7.zip
Center scp window. Change label to let the user know port numbers are
accepted. Handle port numbers in the host string (#227909).
-rw-r--r--ChangeLog6
-rw-r--r--exception.py18
-rw-r--r--ui/scp.glade3
3 files changed, 24 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 2bee1e284..6bfd00d31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,12 @@
deselect default packages and select optional ones. This is required
for supporting the extended kickstart group selection syntax.
+ * ui/scp.glade: Center scp window. Change label to let the user know
+ port numbers are accepted.
+
+ * exception.py (copyExceptionToRemote): Handle port numbers in the
+ host string (#227909).
+
2007-02-23 Dave Lehman <dlehman@redhat.com>
* yuminstall.py (selectBestKernel): actually select kernel-xen-devel
diff --git a/exception.py b/exception.py
index e9a7f468e..e9eb23b59 100644
--- a/exception.py
+++ b/exception.py
@@ -224,6 +224,20 @@ def copyExceptionToRemote(intf):
(host, path, user, password) = scpInfo
+ if host.find(":") != -1:
+ (host, port) = host.split(":")
+
+ # Try to convert the port to an integer just as a check to see
+ # if it's a valid port number. If not, they'll get a chance to
+ # correct the information when scp fails.
+ try:
+ int(port)
+ portArgs = ["-P", port]
+ except ValueError:
+ portArgs = []
+ else:
+ portArgs = []
+
# Thanks to Will Woods <wwoods@redhat.com> for the scp control
# here and in scpAuthenticate.
@@ -236,8 +250,8 @@ def copyExceptionToRemote(intf):
elif childpid == 0:
# child process - run scp
args = ["scp", "-oNumberOfPasswordPrompts=1",
- "-oStrictHostKeyChecking=no", "/tmp/anacdump.txt",
- "%s@%s:%s" % (user, host, path)]
+ "-oStrictHostKeyChecking=no"] + portArgs + \
+ ["/tmp/anacdump.txt", "%s@%s:%s" % (user, host, path)]
os.execvp("scp", args)
# parent process
diff --git a/ui/scp.glade b/ui/scp.glade
index 9cbabea9a..4524f2b59 100644
--- a/ui/scp.glade
+++ b/ui/scp.glade
@@ -4,6 +4,7 @@
<property name="gravity">center</property>
<property name="resizable">False</property>
<property name="title" context="True" translatable="True">Save to Remote Host</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
<property name="resize_mode">queue</property>
<property name="events"></property>
<property name="allow_grow">False</property>
@@ -41,7 +42,7 @@
<property name="visible">True</property>
<child>
<widget class="GtkLabel" id="hostLabel">
- <property name="label" context="True" translatable="True">Host</property>
+ <property name="label" context="True" translatable="True">Host (host:port)</property>
<property name="events"></property>
<property name="xalign">0.0</property>
<property name="visible">True</property>