MCPcopy Create free account
hub / github.com/PageBot/PageBot / writeJs

Method writeJs

Lib/pagebot/contexts/htmlcontext/htmlbuilder.py:390–397  ·  view source on GitHub ↗

Write the collected set of css JS to path.

(self, path)

Source from the content-addressed store, hash-verified

388 return ''.join(self._jsOut)
389
390 def writeJs(self, path):
391 """Write the collected set of css JS to path."""
392 try:
393 f = codecs.open(path, 'w', 'utf-8')
394 f.write(self.getJs())
395 f.close()
396 except IOError:
397 print('[%s.writeJs] Cannot write JS file "%s"' % (self.__class__.__name__, path))
398
399 # C S S
400

Callers

nothing calls this directly

Calls 3

getJsMethod · 0.95
writeMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected