]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Add python2 compatibility to removal ability
authorSimon Wydooghe <wydooghe.simon@gmail.com>
Mon, 28 Mar 2016 12:06:31 +0000 (14:06 +0200)
committerSimon Wydooghe <wydooghe.simon@gmail.com>
Mon, 28 Mar 2016 12:06:31 +0000 (14:06 +0200)
autorandr.py

index f262e6dd989f19dc2ab6c6390092dfff4a65740b..a65322d90c4ea4168a4748ba47befb5423e1de85 100755 (executable)
@@ -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