mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Retry when watch-compiling coffeescript
This commit is contained in:
parent
9b2ebcfdc5
commit
9529fa26dc
@ -62,8 +62,13 @@ class Coffee(Command): # {{{
|
||||
'*.coffee')):
|
||||
bn = os.path.basename(f).rpartition('.')[0]
|
||||
arcname = src.replace('/', '.') + '.' + bn + '.js'
|
||||
with open(f, 'rb') as fs:
|
||||
src_files[arcname] = (f, hashlib.sha1(fs.read()).hexdigest())
|
||||
try:
|
||||
with open(f, 'rb') as fs:
|
||||
src_files[arcname] = (f, hashlib.sha1(fs.read()).hexdigest())
|
||||
except EnvironmentError:
|
||||
time.sleep(0.1)
|
||||
with open(f, 'rb') as fs:
|
||||
src_files[arcname] = (f, hashlib.sha1(fs.read()).hexdigest())
|
||||
|
||||
existing = {}
|
||||
dest = self.j(self.RESOURCES, 'compiled_coffeescript.zip')
|
||||
|
Loading…
x
Reference in New Issue
Block a user