Commits

John ZuHone committed d2c8c46

1) Edited a line to reduce its length.
2) Added a check to the value of the runtime parameter/scalar to strip it if it is string.

  • Participants
  • Parent commits 5a20a6b

Comments (0)

Files changed (1)

File yt/frontends/flash/data_structures.py

         nn = "/%s %s" % (ptype,
                 {False: "runtime parameters", True: "scalars"}[scalar])
         if nn not in self._handle: raise KeyError(nn)
-        for tpname, pval in zip(self._handle[nn][:,'name'], self._handle[nn][:,'value']):
+        for tpname, pval in zip(self._handle[nn][:,'name'],
+                                self._handle[nn][:,'value']):
             if tpname.strip() == pname:
-                return pval
+                if ptype = "string" :
+                    return pval.strip()
+                else :
+                    return pval
         raise KeyError(pname)
 
     def _parse_parameter_file(self):