summaryrefslogtreecommitdiff
path: root/security/pssh/files/patch-psshlib_psshutil.py
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2009-02-13 20:11:13 +0000
committerBrooks Davis <brooks@FreeBSD.org>2009-02-13 20:11:13 +0000
commit7b81defd3b6d68d2e4e61175a2e488049944643d (patch)
treebc249a3d3397b10dfb5b9ef89b84881d8c93447c /security/pssh/files/patch-psshlib_psshutil.py
parent- Fix pkg-plist after latest ruby update by generting rdoc plist entries (diff)
Upgrade to 1.4.3 which fixes all of the bugs I had patched around and more.
Prodded by: Michael <postmaster at softsearch dot ru> (ages ago), portscout (via miwi)
Diffstat (limited to '')
-rw-r--r--security/pssh/files/patch-psshlib_psshutil.py30
1 files changed, 2 insertions, 28 deletions
diff --git a/security/pssh/files/patch-psshlib_psshutil.py b/security/pssh/files/patch-psshlib_psshutil.py
index a8d90a7dded8..4f6da7662709 100644
--- a/security/pssh/files/patch-psshlib_psshutil.py
+++ b/security/pssh/files/patch-psshlib_psshutil.py
@@ -3,41 +3,15 @@ $FreeBSD$
--- psshlib/psshutil.py.orig
+++ psshlib/psshutil.py
-@@ -1,22 +1,18 @@
- import os, signal, sys
-
--def reaper(signo, frame):
-- while 1:
-- try:
-- pid, status = os.waitpid(-1, os.WNOHANG)
-- except:
-- break
-- if not pid:
-- break
--
- def read_hosts(pathname):
- """
- Read hostfile with lines of the form: host[:port] [login]. Return
+@@ -7,7 +7,10 @@
three arrays: hosts, ports, and users. These can be used directly
for all ssh-based commands (e.g., ssh, scp, rsync -e ssh, etc.)
-+ Empty lines and lines where the first non-blank character is a
-+ '#' character are ignored.
"""
- import re
- f = open(pathname)
+ if pathname == "-":
-+ f = open("/dev/stdin")
++ f = open("/dev/stdin")
+ else:
+ f = open(pathname)
lines = f.readlines()
lines = map(lambda x: x.strip(), lines)
addrs = []
-@@ -24,7 +20,7 @@
- ports = []
- users = []
- for line in lines:
-- if re.match("^\s+$", line) or len(line) == 0:
-+ if re.match("^\s*(#|$)", line):
- continue
- fields = re.split("\s", line)
- if len(fields) == 1: