From: Michael Tremer Date: Tue, 20 Apr 2021 13:16:41 +0000 (+0000) Subject: util: Drop more unused functions X-Git-Tag: 0.9.28~1285^2~293 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8696d6b9641f731c1d53713f1bfcb4333598bebe;p=pakfire.git util: Drop more unused functions Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/util.py b/src/pakfire/util.py index 96ce10f34..0b49f5066 100644 --- a/src/pakfire/util.py +++ b/src/pakfire/util.py @@ -41,27 +41,6 @@ def cli_is_interactive(): return False -def is_enabled(s): - return s in ("true", "yes", "1") - -def ask_user(question): - """ - Ask the user the question, he or she can answer with yes or no. - - This function returns True for "yes" and False for "no". - - If the software is running in a non-inteactive shell, no question - is asked at all and the answer is always "yes". - """ - if not cli_is_interactive(): - return True - - print(_("%s [y/N]") % question, end=' ') - ret = input() - print() # Just an empty line. - - return ret in ("y", "Y", "z", "Z", "j", "J") - def random_string(length=20): s = ""