[AutoTool] Fix error handling for ccw=None
This commit is contained in:
parent
2b7ad00204
commit
66d6fae2bd
1 changed files with 7 additions and 0 deletions
|
|
@ -590,6 +590,13 @@ class AutoTool(Tool, metaclass=ABCMeta):
|
|||
) -> tuple[Port, LData]:
|
||||
|
||||
success = False
|
||||
|
||||
# Initialize these to avoid UnboundLocalError in the error message
|
||||
bend_dxy, bend_angle = numpy.zeros(2), pi
|
||||
itrans_dxy = numpy.zeros(2)
|
||||
otrans_dxy = numpy.zeros(2)
|
||||
btrans_dxy = numpy.zeros(2)
|
||||
|
||||
for straight in self.straights:
|
||||
for bend in self.bends:
|
||||
bend_dxy, bend_angle = self._bend2dxy(bend, ccw)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue