From ea5ee0e7c878d081046cfc22e4caeb7a1b20812f Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 28 Dec 2014 14:52:35 +0100 Subject: [PATCH] Only remove icon tree if necessary. --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f525b6775..77b9fe983 100755 --- a/setup.py +++ b/setup.py @@ -35,7 +35,10 @@ BASEDIR = os.path.dirname(os.path.realpath(__file__)) icon_path = os.path.join('qutebrowser', 'icons') -shutil.rmtree(icon_path) +try: + shutil.rmtree(icon_path) +except OSError: + pass os.mkdir(icon_path) for fn in glob.glob('icons/*.png'): shutil.copy(fn, icon_path)