Changeset View
Changeset View
Standalone View
Standalone View
sysutils/catfish/files/patch-catfish__lib_SudoDialog.py
- This file was added.
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
--- catfish_lib/SudoDialog.py.orig 2019-07-27 11:21:22 UTC | |||||
+++ catfish_lib/SudoDialog.py | |||||
@@ -18,6 +18,7 @@ | |||||
from gi.repository import Gtk, GdkPixbuf | |||||
import os | |||||
+import sys | |||||
from locale import gettext as _ | |||||
@@ -316,7 +317,11 @@ class SudoDialog(Gtk.Dialog): | |||||
Return True if successful. | |||||
''' | |||||
# Set the pexpect variables and spawn the process. | |||||
- child = env_spawn('sudo /bin/true', 1) | |||||
+ if sys.platform.startswith('linux'): | |||||
+ child = env_spawn('sudo /bin/true', 1) | |||||
+ elif 'bsd' in sys.platform or sys.platform.startswith('dragonfly'): | |||||
+ child = env_spawn('sudo /usr/bin/true', 1) | |||||
+ | |||||
try: | |||||
# Check for password prompt or program exit. | |||||
child.expect([".*ssword.*", pexpect.EOF]) |