summarylogtreecommitdiffstats
path: root/pssh-read-stdin-as-bytes-in-Python-3.patch
diff options
context:
space:
mode:
authorBoris Momčilović2018-08-07 18:26:35 +0200
committerBoris Momčilović2018-08-07 18:26:35 +0200
commit98f92d005c7a941c3c786570373d03a16f77fe50 (patch)
tree54708ff5428ab9a173cfa5718ad3a58028819232 /pssh-read-stdin-as-bytes-in-Python-3.patch
downloadaur-98f92d005c7a941c3c786570373d03a16f77fe50.tar.gz
rename package
Diffstat (limited to 'pssh-read-stdin-as-bytes-in-Python-3.patch')
-rw-r--r--pssh-read-stdin-as-bytes-in-Python-3.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/pssh-read-stdin-as-bytes-in-Python-3.patch b/pssh-read-stdin-as-bytes-in-Python-3.patch
new file mode 100644
index 000000000000..c64d77461cb2
--- /dev/null
+++ b/pssh-read-stdin-as-bytes-in-Python-3.patch
@@ -0,0 +1,16 @@
+diff --git a/bin/pssh b/bin/pssh
+index 860bad2..5fe726d 100755
+--- a/bin/pssh
++++ b/bin/pssh
+@@ -65,7 +65,10 @@ def do_pssh(hosts, cmdline, opts):
+ if opts.errdir and not os.path.exists(opts.errdir):
+ os.makedirs(opts.errdir)
+ if opts.send_input:
+- stdin = sys.stdin.read()
++ if hasattr(sys.stdin, 'buffer'):
++ stdin = sys.stdin.buffer.read()
++ else:
++ stdin = sys.stdin.read()
+ else:
+ stdin = None
+ manager = Manager(opts)