diff options
author | Mark Hatle <mark.hatle@amd.com> | 2024-06-03 14:48:48 -0600 |
---|---|---|
committer | Mark Hatle <mark.hatle@amd.com> | 2024-06-03 14:48:56 -0600 |
commit | 82a7d0286dd5fdd4c624416347419baf3bdc82ff (patch) | |
tree | d1562a656ec81fa64d1a719804850b80e83d6860 | |
parent | 955eaa968ab0ec0a4fc8d109f6eb0457844d6f00 (diff) | |
download | meta-xilinx-82a7d0286dd5fdd4c624416347419baf3bdc82ff.tar.gz |
meta-xilinx-standalone-sdt: esw.bbclas: Avoid exception
When the glob '*_g.c' does not exist in the source code an exception could
occur. Avoid this by checking if any files were found before looking for
the first file.
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
-rw-r--r-- | meta-xilinx-standalone-sdt/classes-recipe/esw.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta-xilinx-standalone-sdt/classes-recipe/esw.bbclass b/meta-xilinx-standalone-sdt/classes-recipe/esw.bbclass index 921e2fe0..a87e1dad 100644 --- a/meta-xilinx-standalone-sdt/classes-recipe/esw.bbclass +++ b/meta-xilinx-standalone-sdt/classes-recipe/esw.bbclass | |||
@@ -152,7 +152,7 @@ python do_generate_driver_data() { | |||
152 | command = ["lopper"] + ["-f"] + [system_dt[0]] + ["--"] + ["baremetalconfig_xlnx.py"] + [machine] + [src_dir[0]] | 152 | command = ["lopper"] + ["-f"] + [system_dt[0]] + ["--"] + ["baremetalconfig_xlnx.py"] + [machine] + [src_dir[0]] |
153 | subprocess.run(command, check = True) | 153 | subprocess.run(command, check = True) |
154 | src_file = glob.glob('*_g.c') | 154 | src_file = glob.glob('*_g.c') |
155 | if os.path.exists(src_file[0]): | 155 | if src_file and os.path.exists(src_file[0]): |
156 | bb.note("Generated config file for driver %s" % driver_name) | 156 | bb.note("Generated config file for driver %s" % driver_name) |
157 | command = ["install"] + ["-m"] + ["0755"] + [src_file[0]] + [src_dir[0]] | 157 | command = ["install"] + ["-m"] + ["0755"] + [src_file[0]] + [src_dir[0]] |
158 | subprocess.run(command, check = True) | 158 | subprocess.run(command, check = True) |