From 435f3158e6166a39a01bc8fc859920b7292234a7 Mon Sep 17 00:00:00 2001 From: Simon Wydooghe Date: Mon, 28 Mar 2016 14:06:31 +0200 Subject: [PATCH] Add python2 compatibility to removal ability --- autorandr.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autorandr.py b/autorandr.py index f262e6d..a65322d 100755 --- a/autorandr.py +++ b/autorandr.py @@ -40,6 +40,10 @@ from distutils.version import LooseVersion as Version from functools import reduce from itertools import chain +try: + input = raw_input +except NameError: + pass virtual_profiles = [ # (name, description, callback) @@ -807,7 +811,7 @@ def main(argv): profile_dirlist.remove("config") profile_dirlist.remove("setup") if profile_dirlist: - print("Profile folder '%s' contains the following:\n---\n%s\n---" % (options["--remove"], "\n".join(profile_dirlist))) + print("Profile folder '%s' contains the following additional files:\n---\n%s\n---" % (options["--remove"], "\n".join(profile_dirlist))) response = input("Do you really want to remove profile '%s'? If so, type 'yes': " % options["--remove"]).strip() if response != "yes": remove = False -- 2.39.2