Skip to content

Commit 69a0c59

Browse files
committedMar 2, 2015
make.py: use ternary getattr
1 parent 410a162 commit 69a0c59

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed
 

Diff for: ‎make.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,7 @@ def _get_args():
158158
if hasattr(soc, sdram_phy):
159159
sdram_phy_header = initsequence.get_sdram_phy_header(getattr(soc, sdram_phy))
160160
write_to_file("software/include/generated/sdram_phy.h", boilerplate + sdram_phy_header)
161-
try:
162-
flash_boot_address = soc.flash_boot_address
163-
except AttributeError:
164-
flash_boot_address = None
165-
mem_header = cpuif.get_mem_header(soc.memory_regions, flash_boot_address)
161+
mem_header = cpuif.get_mem_header(soc.memory_regions, getattr(soc, "flash_boot_address", None))
166162
write_to_file("software/include/generated/mem.h", boilerplate + mem_header)
167163
csr_header = cpuif.get_csr_header(soc.csr_regions, soc.interrupt_map)
168164
write_to_file("software/include/generated/csr.h", boilerplate + csr_header)

0 commit comments

Comments
 (0)
Please sign in to comment.