mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 10:33:12 +02:00
Retry when watch-compiling coffeescript
This commit is contained in:
parent
9b2ebcfdc5
commit
9529fa26dc
1 changed files with 7 additions and 2 deletions
|
|
@ -62,8 +62,13 @@ def do_coffee_compile(self, opts, timestamp=False, ignore_errors=False):
|
|||
'*.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…
Reference in a new issue