summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-misc/mugshot/files/fix_env_spawn_args.patch')
-rw-r--r--x11-misc/mugshot/files/fix_env_spawn_args.patch47
1 files changed, 0 insertions, 47 deletions
diff --git a/x11-misc/mugshot/files/fix_env_spawn_args.patch b/x11-misc/mugshot/files/fix_env_spawn_args.patch
deleted file mode 100644
index bb24418a7dbc..000000000000
--- a/x11-misc/mugshot/files/fix_env_spawn_args.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- a/mugshot_lib/SudoDialog.py 2018-04-12 00:23:21.000000000 +0200
-+++ b/mugshot_lib/SudoDialog.py 2018-06-22 22:21:10.876589365 +0200
-@@ -48,7 +48,7 @@
- return False
-
- # Check for LANG requirements
-- child = env_spawn('sudo -v', 1)
-+ child = env_spawn('sudo', ['-v'], 1)
- if child.expect([".*ssword.*", "Sorry",
- pexpect.EOF,
- pexpect.TIMEOUT]) == 3:
-@@ -57,7 +57,7 @@
- child.close()
-
- # Check for sudo rights
-- child = env_spawn('sudo -v', 1)
-+ child = env_spawn('sudo', ['-v'], 1)
- try:
- index = child.expect([".*ssword.*", "Sorry",
- pexpect.EOF, pexpect.TIMEOUT])
-@@ -76,14 +76,14 @@
- return False
-
-
--def env_spawn(command, timeout):
-+def env_spawn(command, args, timeout):
- """Use pexpect.spawn, adapt for timeout and env requirements."""
- env = os.environ
- env["LANG"] = "C"
- if use_env:
-- child = pexpect.spawn(command, env)
-+ child = pexpect.spawn(command, args, env)
- else:
-- child = pexpect.spawn(command)
-+ child = pexpect.spawn(command, args)
- child.timeout = timeout
- return child
-
-@@ -304,7 +304,7 @@
- Return True if successful.
- '''
- # Set the pexpect variables and spawn the process.
-- child = env_spawn('sudo /bin/true', 1)
-+ child = env_spawn('sudo', ['/bin/true'], 1)
- try:
- # Check for password prompt or program exit.
- child.expect([".*ssword.*", pexpect.EOF])