diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2020-12-28 07:13:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-28 07:13:16 +0100 |
| commit | f31e09312acf540b22b01368e5876ae161d74644 (patch) | |
| tree | e8f3fa84d5fb766291e8ab39b60a040a90ad39d9 /lib | |
| parent | fc8f1d0aae42ab1394c5a09df07569013a92438f (diff) | |
fix min_arg() is an empty sequence (#941)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/stitches/auto_fill.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/stitches/auto_fill.py b/lib/stitches/auto_fill.py index dbbef136..b5157a5a 100644 --- a/lib/stitches/auto_fill.py +++ b/lib/stitches/auto_fill.py @@ -52,7 +52,12 @@ def auto_fill(shape, starting_point, ending_point=None, underpath=True): - fill_stitch_graph = build_fill_stitch_graph(shape, angle, row_spacing, end_row_spacing, starting_point, ending_point) + fill_stitch_graph = [] + try: + fill_stitch_graph = build_fill_stitch_graph(shape, angle, row_spacing, end_row_spacing, starting_point, ending_point) + except ValueError: + # Small shapes will cause the graph to fail - min() arg is an empty sequence through insert node + return fallback(shape, running_stitch_length) if not graph_is_valid(fill_stitch_graph, shape, max_stitch_length): return fallback(shape, running_stitch_length) |
