From 2aeae8e37a5e977adc07c0be593e7f0a3d6e3ae8 Mon Sep 17 00:00:00 2001
From: Daniel Brown <ddb@star.sr.bham.ac.uk>
Date: Tue, 4 Feb 2014 16:36:51 +0000
Subject: [PATCH] small fixes for const parsing

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

diff --git a/pykat/finesse.py b/pykat/finesse.py
index 508a578..2126d14 100644
--- a/pykat/finesse.py
+++ b/pykat/finesse.py
@@ -344,11 +344,11 @@ class kat(object):
             
             if len(values)>0 and values[0] == 'const':
                 
-                if len(values) == 3:
+                if len(values) >= 3:
                     if values[1] in constants:
                         raise pkex.BasePyKatException('const command with the name "{0}" already used'.format(values[1]))
                     else:
-                        constants[str(values[1])] = Constant(values[1], SIfloat(values[2]), [])
+                        constants[str(values[1])] = Constant(values[1], values[2], [])
                 else:
                     raise pkex.BasePyKatException('const command "{0}" was not the correct format'.format(line))
         
-- 
GitLab