Skip to content

Commit ff1759d

Browse files
ChsudeeptaChsudeepta
authored andcommitted
Added logic to check input type for Block name
1 parent 9af767d commit ff1759d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/genie_python/genie_waitfor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,9 @@ def start_waiting(
356356
)
357357

358358
if block is not None:
359+
if not isinstance(block, str):
360+
raise TypeError("first argument must be a valid block name or None, not {}".format(block))
361+
359362
if not self.api.block_exists(block):
360363
raise NameError('No block with the name "{}" exists'.format(block))
361364
block = self.api.correct_blockname(block, add_prefix=False)

0 commit comments

Comments
 (0)