mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 23:53:27 +02:00
Only catch and ignore EnvironmentErrors when installing env module
This commit is contained in:
parent
c4f232b967
commit
e83fc1c982
1 changed files with 3 additions and 2 deletions
|
|
@ -144,12 +144,13 @@ def install_env_module(self):
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue