diff options
| author | Emilio C. Lopes | 2014-07-28 21:08:43 +0200 |
|---|---|---|
| committer | Michael Albinus | 2014-07-28 21:08:43 +0200 |
| commit | 81abec91eed06fd2d2d37388bba2fb451991abcd (patch) | |
| tree | cc7d51797becf5d1d250a9bb73aff468fcf02994 | |
| parent | 5dc4b8ca3d925213465ae5440ff48fcd999ccc3a (diff) | |
| download | emacs-81abec91eed06fd2d2d37388bba2fb451991abcd.tar.gz emacs-81abec91eed06fd2d2d37388bba2fb451991abcd.zip | |
* 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.
Fixes: debbugs:18118
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 12 |
2 files changed, 16 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1d00a180e9c..776c6600694 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,4 +1,12 @@ | |||
| 1 | 2014-07-28 Eli Zaretskii <eliz@gnu.org> | 1 | 2014-07-28 Emilio C. Lopes <eclig@gmx.net> |
| 2 | |||
| 3 | * net/tramp-sh.el (tramp-get-remote-python): Also search for | ||
| 4 | executables named "python2" or "python3". | ||
| 5 | (tramp-get-remote-uid-with-python): Use parentheses around | ||
| 6 | arguments to `print' to make it compatible with Python 3. | ||
| 7 | (tramp-get-remote-gid-with-python): Ditto. (Bug#18118) | ||
| 8 | |||
| 9 | 22014-07-28 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | 10 | ||
| 3 | * window.el (window--pixel-to-total): Use FRAME's root window, not | 11 | * window.el (window--pixel-to-total): Use FRAME's root window, not |
| 4 | that of the selected frame. (Bug#18112, Bug#16674) | 12 | that of the selected frame. (Bug#18112, Bug#16674) |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 315bc08d0ef..e234162bd4a 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -5256,7 +5256,9 @@ Return ATTR." | |||
| 5256 | (defun tramp-get-remote-python (vec) | 5256 | (defun tramp-get-remote-python (vec) |
| 5257 | (with-tramp-connection-property vec "python" | 5257 | (with-tramp-connection-property vec "python" |
| 5258 | (tramp-message vec 5 "Finding a suitable `python' command") | 5258 | (tramp-message vec 5 "Finding a suitable `python' command") |
| 5259 | (tramp-find-executable vec "python" (tramp-get-remote-path vec)))) | 5259 | (or (tramp-find-executable vec "python" (tramp-get-remote-path vec)) |
| 5260 | (tramp-find-executable vec "python2" (tramp-get-remote-path vec)) | ||
| 5261 | (tramp-find-executable vec "python3" (tramp-get-remote-path vec))))) | ||
| 5260 | 5262 | ||
| 5261 | (defun tramp-get-remote-uid-with-python (vec id-format) | 5263 | (defun tramp-get-remote-uid-with-python (vec id-format) |
| 5262 | (tramp-send-command-and-read | 5264 | (tramp-send-command-and-read |
| @@ -5264,8 +5266,8 @@ Return ATTR." | |||
| 5264 | (format "%s -c \"%s\"" | 5266 | (format "%s -c \"%s\"" |
| 5265 | (tramp-get-remote-python vec) | 5267 | (tramp-get-remote-python vec) |
| 5266 | (if (equal id-format 'integer) | 5268 | (if (equal id-format 'integer) |
| 5267 | "import os; print os.getuid()" | 5269 | "import os; print (os.getuid())" |
| 5268 | "import os, pwd; print '\\\"' + pwd.getpwuid(os.getuid())[0] + '\\\"'")))) | 5270 | "import os, pwd; print ('\\\"' + pwd.getpwuid(os.getuid())[0] + '\\\"')")))) |
| 5269 | 5271 | ||
| 5270 | (defun tramp-get-remote-uid (vec id-format) | 5272 | (defun tramp-get-remote-uid (vec id-format) |
| 5271 | (with-tramp-connection-property vec (format "uid-%s" id-format) | 5273 | (with-tramp-connection-property vec (format "uid-%s" id-format) |
| @@ -5305,8 +5307,8 @@ Return ATTR." | |||
| 5305 | (format "%s -c \"%s\"" | 5307 | (format "%s -c \"%s\"" |
| 5306 | (tramp-get-remote-python vec) | 5308 | (tramp-get-remote-python vec) |
| 5307 | (if (equal id-format 'integer) | 5309 | (if (equal id-format 'integer) |
| 5308 | "import os; print os.getgid()" | 5310 | "import os; print (os.getgid())" |
| 5309 | "import os, grp; print '\\\"' + grp.getgrgid(os.getgid())[0] + '\\\"'")))) | 5311 | "import os, grp; print ('\\\"' + grp.getgrgid(os.getgid())[0] + '\\\"')")))) |
| 5310 | 5312 | ||
| 5311 | (defun tramp-get-remote-gid (vec id-format) | 5313 | (defun tramp-get-remote-gid (vec id-format) |
| 5312 | (with-tramp-connection-property vec (format "gid-%s" id-format) | 5314 | (with-tramp-connection-property vec (format "gid-%s" id-format) |