uninstall.py

changeset 5068
3a5e58eeb64a
parent 5055
7db1b9496e52
child 5389
9b1c800daff3
--- a/uninstall.py	Wed Jul 27 15:28:26 2016 +0200
+++ b/uninstall.py	Wed Jul 27 15:38:27 2016 +0200
@@ -21,6 +21,8 @@
 if sys.version_info[0] == 2:
     import sip
     sip.setapi('QString', 2)
+else:
+    raw_input = input
 
 # get a local eric6config.py out of the way
 if os.path.exists("eric6config.py"):
@@ -251,12 +253,8 @@
             print("  - {0}".format(path))
         answer = "c"
         while answer not in ["y", "Y", "n", "N", ""]:
-            if sys.version_info[0] == 2:
-                answer = raw_input(
-                    "Shall these directories be removed (y/N)? ")
-            else:
-                answer = input(
-                    "Shall these directories be removed (y/N)? ")
+            answer = raw_input(
+                "Shall these directories be removed (y/N)? ")
         if answer in ["y", "Y"]:
             for path in pathsToRemove:
                 shutil.rmtree(path)
@@ -272,12 +270,8 @@
         print("  - {0}".format(cfg))
         answer = "c"
         while answer not in ["y", "Y", "n", "N", ""]:
-            if sys.version_info[0] == 2:
-                answer = raw_input(
-                    "Shall this directory be removed (y/N)? ")
-            else:
-                answer = input(
-                    "Shall this directory be removed (y/N)? ")
+            answer = raw_input(
+                "Shall this directory be removed (y/N)? ")
         if answer in ["y", "Y"]:
             shutil.rmtree(cfg)
 
@@ -304,12 +298,8 @@
         print("  - {0}".format(settingsDir))
         answer = "c"
         while answer not in ["y", "Y", "n", "N", ""]:
-            if sys.version_info[0] == 2:
-                answer = raw_input(
-                    "Shall this directory be removed (y/N)? ")
-            else:
-                answer = input(
-                    "Shall this directory be removed (y/N)? ")
+            answer = raw_input(
+                "Shall this directory be removed (y/N)? ")
         if answer in ["y", "Y"]:
             shutil.rmtree(settingsDir)
 

eric ide

mercurial