Skip to content

Commit 4da7730

Browse files
committed
fix load_shape_from_file method
1 parent a6c30f5 commit 4da7730

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pygem/stephandler.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@ def load_shape_from_file(self, filename):
5656
if return_transfer:
5757
# load all shapes in one
5858
shape = reader.OneShape()
59-
60-
return shape
59+
return shape
60+
else:
61+
raise RuntimeError("Shapes not loaded.")
62+
else:
63+
raise RuntimeError("Cannot read the file.")
6164

6265
def write_shape_to_file(self, shape, filename):
6366
"""

0 commit comments

Comments
 (0)