diff --git a/klayout/EBeam/pymacros/pcells_EBeam/ebeam_dc_halfring_straight.py b/klayout/EBeam/pymacros/pcells_EBeam/ebeam_dc_halfring_straight.py index 82b5d17f..ea297512 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/ebeam_dc_halfring_straight.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/ebeam_dc_halfring_straight.py @@ -56,10 +56,11 @@ def produce_impl(self): # draw the half-circle x = 0 y = r+w+g - try: + from SiEPIC import __version__ + if __version__ > '0.5.0': self.cell.shapes(LayerSiN).insert(arc_wg_xy(x-Lc/2, y, r, w, 180, 270, dbu=dbu)) # dbu argument introduced in SiEPIC 0.5.1 self.cell.shapes(LayerSiN).insert(arc_wg_xy(x+Lc/2, y, r, w, 270, 360, dbu=dbu)) - except: + else: self.cell.shapes(LayerSiN).insert(arc_wg_xy(x-Lc/2, y, r, w, 180, 270)) self.cell.shapes(LayerSiN).insert(arc_wg_xy(x+Lc/2, y, r, w, 270, 360))