summaryrefslogtreecommitdiff
path: root/src/ngspicetoModelica/NgspicetoModelica.py
diff options
context:
space:
mode:
authorfahim-oscad2016-04-28 16:46:32 +0530
committerfahim-oscad2016-04-28 16:46:32 +0530
commit2debdb42d3acc1e6beacbba0809905f38ee06fcc (patch)
tree52472a6940658222d2110b263f5d33395ad4a70c /src/ngspicetoModelica/NgspicetoModelica.py
parent458d27e3fa3f8864eb2b47e2b39ca74a6f5e035f (diff)
downloadeSim-2debdb42d3acc1e6beacbba0809905f38ee06fcc.tar.gz
eSim-2debdb42d3acc1e6beacbba0809905f38ee06fcc.tar.bz2
eSim-2debdb42d3acc1e6beacbba0809905f38ee06fcc.zip
Modified getunit function : Now it lower the case before taking value from Mapping.json
Diffstat (limited to 'src/ngspicetoModelica/NgspicetoModelica.py')
-rw-r--r--src/ngspicetoModelica/NgspicetoModelica.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ngspicetoModelica/NgspicetoModelica.py b/src/ngspicetoModelica/NgspicetoModelica.py
index 058a2442..a8ef6048 100644
--- a/src/ngspicetoModelica/NgspicetoModelica.py
+++ b/src/ngspicetoModelica/NgspicetoModelica.py
@@ -229,6 +229,7 @@ class NgMoConverter:
#regExp = re.compile("([0-9]+)([a-zA-Z]+)")
#Remove '(' and ')' if any
compValue = compValue.replace('(','').replace(')','')
+ compValue = compValue.lower()
#regExp = re.compile("([-])?([0-9]+)\.?([0-9]+)?([a-zA-Z])?")
regExp = re.compile("([-])?([0-9]+)\.?([0-9]+)?(\w+)?")
matchString = regExp.match(str(compValue)) #separating number and string