ports/sysutils/catfish/files/patch-catfish__lib_SudoDialog.py
Guido Falsi 148a54de25 - Update catfish to 1.4.10
- Upstream removed gksu support, escalation now provided by polkit
  and/or sudo
- Install man page in correct location and compress it
- Silence some portlint warnings

Extra pathces provided by Olivier Duchateau <duchateau.olivier@gmail.com>
2019-09-13 15:46:26 +00:00

23 lines
779 B
Python

--- 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])