mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-12 02:40:34 -08:00
* 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
This commit is contained in:
parent
5dc4b8ca3d
commit
81abec91ee
2 changed files with 16 additions and 6 deletions
|
|
@ -1,4 +1,12 @@
|
|||
2014-07-28 Eli Zaretskii <eliz@gnu.org>
|
||||
2014-07-28 Emilio C. Lopes <eclig@gmx.net>
|
||||
|
||||
* 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 <eliz@gnu.org>
|
||||
|
||||
* window.el (window--pixel-to-total): Use FRAME's root window, not
|
||||
that of the selected frame. (Bug#18112, Bug#16674)
|
||||
|
|
|
|||
|
|
@ -5256,7 +5256,9 @@ Return ATTR."
|
|||
(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 @@ Return ATTR."
|
|||
(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 @@ Return ATTR."
|
|||
(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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue