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("Generating QRC file ...")
_logger.info("Resource prefix: %s" % resource_prefix)
_logger.info("Style prefix: %s" % style_prefix)
_logger.info("Searching in: %s" % RC_PATH)
# Search by png images
for fname in sorted(os.listdir(RC_PATH)):
files.append(TEMPLATE_QRC_FILE.format(fname=fname))
# Join parts
qrc_content = (TEMPLATE_QRC_HEADER.format(resource_prefix=resource_prefix)
+ '\n'.join(files)
+ TEMPLATE_QRC_FOOTER.format(style_prefix=style_prefix))
_logger.info("Writing in: %s" % QRC_FILEPATH)
# Write qrc file
with open(QRC_FILEPATH, 'w') as fh:
fh.write(qrc_content)
_logger.info("Searching in: %s" % RC_PATH)
# Search by png images
for fname in sorted(os.listdir(RC_PATH)):
files.append(TEMPLATE_QRC_FILE.format(fname=fname))
# Join parts
qrc_content = (TEMPLATE_QRC_HEADER.format(resource_prefix=resource_prefix)
+ '\n'.join(files)
+ TEMPLATE_QRC_FOOTER.format(style_prefix=style_prefix))
_logger.info("Writing in: %s" % QRC_FILEPATH)
# Write qrc file
with open(QRC_FILEPATH, 'w') as fh:
fh.write(qrc_content)