summaryrefslogtreecommitdiff
path: root/scripts/dictcli.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-11-03 13:47:30 +0100
committerFlorian Bruhin <me@the-compiler.org>2020-11-04 18:27:26 +0100
commit2929949d676eaf679fc845602ce2ee7a5160dc51 (patch)
treedcfcc6ae7f772f62d948091855f463f2f8f9656d /scripts/dictcli.py
parent85832c76db6001be822319ab92bae7ac592b3ccb (diff)
downloadqutebrowser-2929949d676eaf679fc845602ce2ee7a5160dc51.tar.gz
qutebrowser-2929949d676eaf679fc845602ce2ee7a5160dc51.zip
old qt: Remove conditionals for spell checks
Diffstat (limited to 'scripts/dictcli.py')
-rwxr-xr-xscripts/dictcli.py30
1 files changed, 2 insertions, 28 deletions
diff --git a/scripts/dictcli.py b/scripts/dictcli.py
index ebe4e285c..3acfb8fbb 100755
--- a/scripts/dictcli.py
+++ b/scripts/dictcli.py
@@ -216,17 +216,8 @@ def install_lang(lang):
def install(languages):
"""Install languages."""
for lang in languages:
- try:
- print('Installing {}: {}'.format(lang.code, lang.name))
- install_lang(lang)
- except PermissionError as e:
- msg = ("\n{}\n\nWith Qt < 5.10, you will need to run this script "
- "as root, as dictionaries need to be installed "
- "system-wide. If your qutebrowser uses a newer Qt version "
- "via a virtualenv, make sure you start this script with "
- "the virtualenv's Python.".format(e))
- scriptutils.print_error(msg)
- sys.exit(1)
+ print('Installing {}: {}'.format(lang.code, lang.name))
+ install_lang(lang)
def update(languages):
@@ -250,24 +241,7 @@ def remove_old(languages):
os.remove(os.path.join(spell.dictionary_dir(), old_file))
-def check_root():
- """Ask for confirmation if running as root when unnecessary."""
- if not utils.is_posix:
- return
-
- if spell.can_use_data_path() and os.geteuid() == 0:
- print("You're running Qt >= 5.10 which means qutebrowser will "
- "load dictionaries from a path in your home-directory. "
- "Unless you run qutebrowser as root (bad idea!), you "
- "most likely want to run this script as your user. ")
- answer = input("Do you want to continue anyways? [y/N] ")
- if answer not in ['y', 'Y']:
- sys.exit(0)
-
-
def main():
- check_root()
-
if configdata.DATA is None:
configdata.init()
standarddir.init(None)