Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tawindow.py
diff options
context:
space:
mode:
Diffstat (limited to 'tawindow.py')
-rw-r--r--tawindow.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tawindow.py b/tawindow.py
index 7b2edee..43e9bfb 100644
--- a/tawindow.py
+++ b/tawindow.py
@@ -1525,9 +1525,15 @@ class TurtleArtWindow():
b2.name in ['product2', 'minus2', 'sqrt', 'division2', 'random',
'remainder2', 'string']:
if b1.name == 'string' and len(b1.values[0]) != 1:
- return False
+ try:
+ float(b1.values[0])
+ except ValueError:
+ return False
elif b2.name == 'string' and len(b2.values[0]) != 1:
- return False
+ try:
+ float(b2.values[0])
+ except ValueError:
+ return False
return True
"""