Skip to content

Commit 26c051c

Browse files
committed
Fix how multiple ways to specify size are handled
1 parent 4c68c4f commit 26c051c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

surfer/_commandline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
help="overlay sign")
6161
parser.add_argument("-name",
6262
help="name to use for the overlay")
63-
parser.add_argument("-size", default=800,
63+
parser.add_argument("-size", default=800, nargs="?",
6464
help="size of the display window (in pixels)")
6565
parser.add_argument("-background", metavar="COLOR", default="black",
6666
help="background color for display")

surfer/viz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ def _set_window_properties(self, size, background, foreground):
476476
# old option "size" sets both width and height
477477
try:
478478
width, height = size
479-
except TypeError:
479+
except (TypeError, ValueError):
480480
width, height = size, size
481481
self._scene_size = height, width
482482

0 commit comments

Comments
 (0)