From 649a148209db694aaf4e6e2e7bcbedbe0aada767 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Sat, 22 Jun 2019 11:43:30 -0500 Subject: [PATCH] don't assert on trials if they aren't provided --- dice/roller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dice/roller.py b/dice/roller.py index 3a06f1e..f325d9c 100644 --- a/dice/roller.py +++ b/dice/roller.py @@ -64,7 +64,8 @@ class DiceRoller(object): up to a semicolon or end of line). """ rolls = mods[0][0][1] if mods[0][0][1] else 1 - assert trials <= 10, "Too many rolls (max: 10)." + if trials: + assert trials <= 10, "Too many rolls (max: 10)." assert rolls <= 50, "Too many dice (max: 50) in roll." output = ""