MLECO-1933, MLECO-1914, MLECO-1885: Update to 21.05-rc2 components
Core driver and sofware dependencies updated to latest release
candidate revisions. Note: TensorFlow Lite Micro has not been
updated.
Also, gcc warnings for simple_platform target and ad use case have
been fixed.
Change-Id: I455b421f34375a719a941e6e220fe292a57613f5
diff --git a/scripts/py/gen_rgb_cpp.py b/scripts/py/gen_rgb_cpp.py
index 1a2e09b..957d2d0 100644
--- a/scripts/py/gen_rgb_cpp.py
+++ b/scripts/py/gen_rgb_cpp.py
@@ -127,8 +127,12 @@
header_filepath = os.path.join(args.header_folder_path, header_filename)
common_cc_filename = "InputFiles.cc"
common_cc_filepath = os.path.join(args.source_folder_path, common_cc_filename)
- write_hpp_file(header_filepath, common_cc_filepath, args.license_template,
- image_idx, image_filenames, image_array_names, args.image_size)
+
+ if len(image_filenames) > 0:
+ write_hpp_file(header_filepath, common_cc_filepath, args.license_template,
+ image_idx, image_filenames, image_array_names, args.image_size)
+ else:
+ raise FileNotFoundError("No valid images found.")
if __name__ == '__main__':