From e83fc1c982100c7f79a57184ca5c7cd9b6cfca14 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 28 Aug 2015 07:58:40 +0530 Subject: [PATCH] Only catch and ignore EnvironmentErrors when installing env module --- setup/install.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup/install.py b/setup/install.py index 49ec7f7afe..f7e68cf308 100644 --- a/setup/install.py +++ b/setup/install.py @@ -144,12 +144,13 @@ class Develop(Command): try: if not os.path.exists(libdir): os.makedirs(libdir) + except EnvironmentError: + self.warn('Cannot install calibre environment module to: '+libdir) + else: path = os.path.join(libdir, 'init_calibre.py') self.info('Installing calibre environment module: '+path) with open(path, 'wb') as f: f.write(HEADER.format(**self.template_args())) - except: - self.warn('Cannot install calibre environment module to: '+libdir) def install_files(self): pass