From f2a844a92c82553bc5997e04062e3a7a6302f2ab Mon Sep 17 00:00:00 2001
From: ssl <sean.leavey@aei.mpg.de>
Date: Tue, 28 Jan 2014 11:15:24 +0100
Subject: [PATCH] Bug fix (?)

---
 pykat/finesse.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/pykat/finesse.py b/pykat/finesse.py
index 8c7196b..ac5fb4c 100644
--- a/pykat/finesse.py
+++ b/pykat/finesse.py
@@ -154,6 +154,10 @@ class kat(object):
         self.__tempdir = tempdir
         self.__tempname = tempname
         self.pykatgui = None
+
+	# initialise default block
+	self.__currentTag= NO_BLOCK
+	self.__blocks[NO_BLOCK] = Block(NO_BLOCK)
         
         # Various options for running finesse, typicaly the commands with just 1 input
         # and have no name attached to them.
@@ -219,11 +223,6 @@ class kat(object):
         
     def parseCommands(self, commands):
         blockComment = False
-
-        self.__currentTag= NO_BLOCK
-        
-        if not (NO_BLOCK in self.__blocks):
-            self.__blocks[NO_BLOCK] = Block(NO_BLOCK)
         
         commands=self.remove_comments(commands)
         
-- 
GitLab