[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117603: * net/tramp-sh.el (tramp-get-remote-python)
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] trunk r117603: * net/tramp-sh.el (tramp-get-remote-python): Also search for |
Date: |
Mon, 28 Jul 2014 19:08:49 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117603
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/18118
author: Emilio C. Lopes <address@hidden>
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Mon 2014-07-28 21:08:43 +0200
message:
* net/tramp-sh.el (tramp-get-remote-python): Also search for
executables named "python2" or "python3".
(tramp-get-remote-uid-with-python): Use parentheses around
arguments to `print' to make it compatible with Python 3.
(tramp-get-remote-gid-with-python): Ditto.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/net/tramp-sh.el trampsh.el-20100913133439-a1faifh29eqoi4nh-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-07-28 09:39:09 +0000
+++ b/lisp/ChangeLog 2014-07-28 19:08:43 +0000
@@ -1,4 +1,12 @@
-2014-07-28 Eli Zaretskii <address@hidden>
+2014-07-28 Emilio C. Lopes <address@hidden>
+
+ * net/tramp-sh.el (tramp-get-remote-python): Also search for
+ executables named "python2" or "python3".
+ (tramp-get-remote-uid-with-python): Use parentheses around
+ arguments to `print' to make it compatible with Python 3.
+ (tramp-get-remote-gid-with-python): Ditto. (Bug#18118)
+
+22014-07-28 Eli Zaretskii <address@hidden>
* window.el (window--pixel-to-total): Use FRAME's root window, not
that of the selected frame. (Bug#18112, Bug#16674)
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el 2014-07-03 09:27:02 +0000
+++ b/lisp/net/tramp-sh.el 2014-07-28 19:08:43 +0000
@@ -5256,7 +5256,9 @@
(defun tramp-get-remote-python (vec)
(with-tramp-connection-property vec "python"
(tramp-message vec 5 "Finding a suitable `python' command")
- (tramp-find-executable vec "python" (tramp-get-remote-path vec))))
+ (or (tramp-find-executable vec "python" (tramp-get-remote-path vec))
+ (tramp-find-executable vec "python2" (tramp-get-remote-path vec))
+ (tramp-find-executable vec "python3" (tramp-get-remote-path vec)))))
(defun tramp-get-remote-uid-with-python (vec id-format)
(tramp-send-command-and-read
@@ -5264,8 +5266,8 @@
(format "%s -c \"%s\""
(tramp-get-remote-python vec)
(if (equal id-format 'integer)
- "import os; print os.getuid()"
- "import os, pwd; print '\\\"' + pwd.getpwuid(os.getuid())[0] +
'\\\"'"))))
+ "import os; print (os.getuid())"
+ "import os, pwd; print ('\\\"' + pwd.getpwuid(os.getuid())[0] +
'\\\"')"))))
(defun tramp-get-remote-uid (vec id-format)
(with-tramp-connection-property vec (format "uid-%s" id-format)
@@ -5305,8 +5307,8 @@
(format "%s -c \"%s\""
(tramp-get-remote-python vec)
(if (equal id-format 'integer)
- "import os; print os.getgid()"
- "import os, grp; print '\\\"' + grp.getgrgid(os.getgid())[0] +
'\\\"'"))))
+ "import os; print (os.getgid())"
+ "import os, grp; print ('\\\"' + grp.getgrgid(os.getgid())[0] +
'\\\"')"))))
(defun tramp-get-remote-gid (vec id-format)
(with-tramp-connection-property vec (format "gid-%s" id-format)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117603: * net/tramp-sh.el (tramp-get-remote-python): Also search for,
Michael Albinus <=