-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcnf-python3-and-sudo-fix.patch
More file actions
30 lines (27 loc) · 1.39 KB
/
cnf-python3-and-sudo-fix.patch
File metadata and controls
30 lines (27 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff -up command-not-found-1.3/command-not-found.py.omv~ command-not-found-1.3/command-not-found.py
--- command-not-found-1.3/command-not-found.py.omv~ 2025-05-09 04:27:28.546946897 +0300
+++ command-not-found-1.3/command-not-found.py 2025-05-09 04:29:00.962390396 +0300
@@ -5,7 +5,6 @@
# Licensed under GPL 2.0, see http://www.gnu.org/licenses/gpl-2.0.html
# for the whole text
-from __future__ import print_function
import sys
import codecs
@@ -104,15 +103,13 @@ def main():
else:
pkg = binaries[param][0][1]
print(_(" You can install it by typing:"), file=sys.stderr)
- print(" dnf install %s" % pkg, file=sys.stderr)
+ print(" sudo dnf install %s" % pkg, file=sys.stderr)
if show_inst_prompts:
- res = raw_input(_('Do you want to install it? (y/N)'))
- if sys.stdin.encoding and isinstance(res, str):
- res = res.decode(sys.stdin.encoding)
+ res = input(_('Do you want to install it? (y/N)'))
# any not 'y' string rejects the installation
res = res.lower().strip()
if res == _('y'):
- os.system('dnf install ' + pkg)
+ os.system('sudo dnf install ' + pkg)
return
params = similar_words(param)