Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
LOGGER.info("processing " + fname)
try:
# data = load_json(fname)
data = {}
data["path"] = fname
data["path_image"] = fname[:-3] + ".png"
data["name"] = os.path.basename(os.path.dirname(fname))
data["url"] = "https://github.com/undertherain/pycontextfree/blob/master/examples/" + data["name"] + "/" + os.path.basename(fname)
data["id"] = cnt
name_image = os.path.basename(fname)[:-3] + ".png"
data["image"] = "/gallery/" + name_image
cnt += 1
self.rows.append(data)
except Exception as e:
LOGGER.warning("error processing " + fname + str(e))