Skip to content

Commit

Permalink
Ugly type switch for Position
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Gregory authored and bobthemighty committed Apr 13, 2019
1 parent 525fd6d commit 8fb94cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion photonpump/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,8 @@ def dump(*chunks: bytearray):


def _make_event(record: messages_pb2.ResolvedEvent):
if record.HasField("commit_position"):

if type(record) == messages_pb2.ResolvedEvent:
position = Position(record.commit_position, record.prepare_position)
else:
position = None
Expand Down

0 comments on commit 8fb94cf

Please sign in to comment.