Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/talogo.py
diff options
context:
space:
mode:
Diffstat (limited to 'talogo.py')
-rw-r--r--talogo.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/talogo.py b/talogo.py
index 99c2725..666f9c3 100644
--- a/talogo.py
+++ b/talogo.py
@@ -512,16 +512,17 @@ class LogoCode:
return ['%nothing%']
else:
return ['%nothing%']
- for i in range(1, len(blk.connections)):
- b = blk.connections[i]
- dock = blk.docks[i]
- if len(dock)>4: # There could be a '(', ')', '[' or ']'.
- for c in dock[4]:
- code.append(c)
- if b is not None:
- code.extend(self.blocks_to_code(b))
- elif blk.docks[i][0] not in ['flow', 'unavailable']:
- code.append('%nothing%')
+ if blk.connections is not None and len(blk.connections) > 0:
+ for i in range(1, len(blk.connections)):
+ b = blk.connections[i]
+ dock = blk.docks[i]
+ if len(dock)>4: # There could be a '(', ')', '[' or ']'.
+ for c in dock[4]:
+ code.append(c)
+ if b is not None:
+ code.extend(self.blocks_to_code(b))
+ elif blk.docks[i][0] not in ['flow', 'unavailable']:
+ code.append('%nothing%')
return code
def setup_cmd(self, string):