Skip to content

Commit

Permalink
Fix up item references & Exception refs
Browse files Browse the repository at this point in the history
  • Loading branch information
vEpiphyte committed Dec 26, 2024
1 parent 2172afa commit 335ec71
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
32 changes: 16 additions & 16 deletions synapse/lib/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,13 +1020,13 @@ async def run(self, runt, genr):
yield item

except s_stormctrl.StormBreak as e:
if e.item is not None:
yield e.item
if (eitem := e.get('item')) is not None:
yield eitem
break

except s_stormctrl.StormContinue as e:
if e.item is not None:
yield e.item
if (eitem := e.get('item')) is not None:
yield eitem
continue

finally:
Expand Down Expand Up @@ -1079,13 +1079,13 @@ async def run(self, runt, genr):
yield jtem

except s_stormctrl.StormBreak as e:
if e.item is not None:
yield e.item
if (eitem := e.get('item')) is not None:
yield eitem
break

except s_stormctrl.StormContinue as e:
if e.item is not None:
yield e.item
if (eitem := e.get('item')) is not None:
yield eitem
continue

finally:
Expand All @@ -1109,13 +1109,13 @@ async def run(self, runt, genr):
await asyncio.sleep(0)

except s_stormctrl.StormBreak as e:
if e.item is not None:
yield e.item
if (eitem := e.get('item')) is not None:
yield eitem
break

except s_stormctrl.StormContinue as e:
if e.item is not None:
yield e.item
if (eitem := e.get('item')) is not None:
yield eitem
continue

finally:
Expand All @@ -1133,13 +1133,13 @@ async def run(self, runt, genr):
await asyncio.sleep(0)

except s_stormctrl.StormBreak as e:
if e.item is not None:
yield e.item
if (eitem := e.get('item')) is not None:
yield eitem
break

except s_stormctrl.StormContinue as e:
if e.item is not None:
yield e.item
if (eitem := e.get('item')) is not None:
yield eitem
continue

finally:
Expand Down
4 changes: 2 additions & 2 deletions synapse/lib/stormctrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ def update(self, items):
self.errinfo[k] = v
self._setExcMesg()

class StormLoopCtrl(_SynErrMixin):
class StormLoopCtrl(_SynErrMixin, Exception):
# Control flow statements for WHILE and FOR loop control
statement = ''

class StormGenrCtrl(_SynErrMixin):
class StormGenrCtrl(_SynErrMixin, Exception):
# Control flow statements for GENERATOR control
statement = ''

Expand Down

0 comments on commit 335ec71

Please sign in to comment.