summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2016-08-14 05:03:34 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2016-08-14 05:03:34 +0300
commit0ef56b3a58bceca835b7f450fea5df4b55d29a01 (patch)
tree73058b8d99a8e05c3986ab38f8e1ca93c31d47e5 /setup.py
parentc955d488f9dd0a846531f0a4cef37183fe952022 (diff)
setup.py: Fix error handling in uninstall command
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index ff9547a..16e6c93 100755
--- a/setup.py
+++ b/setup.py
@@ -142,7 +142,8 @@ class Uninstall(Command):
142 print("removing file %s" % entry) 142 print("removing file %s" % entry)
143 os.unlink(entry) 143 os.unlink(entry)
144 except OSError as e: 144 except OSError as e:
145 error(e) 145 print(e)
146 return
146 147
147 directory = os.path.dirname(entry) 148 directory = os.path.dirname(entry)
148 while os.listdir(directory) == []: 149 while os.listdir(directory) == []:
@@ -150,7 +151,8 @@ class Uninstall(Command):
150 print("removing empty directory %s" % directory) 151 print("removing empty directory %s" % directory)
151 os.rmdir(directory) 152 os.rmdir(directory)
152 except OSError as e: 153 except OSError as e:
153 error(e) 154 print(e)
155 break
154 directory = os.path.dirname(directory) 156 directory = os.path.dirname(directory)
155 157
156 def run(self): 158 def run(self):