MCPcopy
hub / github.com/eudicots/Cactus / static

Method static

cactus/site.py:283–302  ·  view source on GitHub ↗

Retrieve a list of static files for the site

(self)

Source from the content-addressed store, hash-verified

281 shutil.rmtree(static.pre_dir)
282
283 def static(self):
284 """
285 Retrieve a list of static files for the site
286 """
287 if self._static is None:
288
289 self._static = []
290
291 for path in fileList(self.static_path, relative=True):
292
293 full_path = os.path.join(self.static_path, path)
294
295 if os.path.islink(full_path):
296 if not os.path.exists(os.path.realpath(full_path)):
297 logger.warning("Skipping symlink that points to unexisting file:\n%s", full_path)
298 continue
299
300 self._static.append(Static(self, path))
301
302 return self._static
303
304 def _get_resource(self, src_url, resources):
305

Callers 8

contextMethod · 0.95
buildMethod · 0.95
get_url_for_staticMethod · 0.95
buildStaticMethod · 0.95
test_extensionsMethod · 0.80
test_discardMethod · 0.80
test_fingerprintMethod · 0.80

Calls 2

fileListFunction · 0.90
StaticClass · 0.90

Tested by 4

test_extensionsMethod · 0.64
test_discardMethod · 0.64
test_fingerprintMethod · 0.64