Skip to content

Commit

Permalink
Fixed issue where event enums were not working as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
fireundubh committed Jun 14, 2021
1 parent eb9b587 commit efc0bc6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions pyro/Enums/Event.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
class Event:
from enum import Enum
from typing import Union


class BuildEvent(Enum):
PRE = 0
POST = 1


class BuildEvent(Event):
pass
class ImportEvent(Enum):
PRE = 0
POST = 1


class ImportEvent(Event):
pass
Event = Union[BuildEvent, ImportEvent]
2 changes: 1 addition & 1 deletion pyro/ProcessManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _format_time(hours: Decimal, minutes: Decimal, seconds: Decimal) -> str:

@staticmethod
def run_event(event_node: etree.ElementBase, project_path: str) -> None:
if not event_node:
if event_node is None:
return

ProcessManager.log.info(event_node.get(XmlAttributeName.DESCRIPTION))
Expand Down

0 comments on commit efc0bc6

Please sign in to comment.