Break JPK data block name extraction out into ._zip_segment_name().
[hooke.git] / hooke / driver / mfp1dexport.py
index 4c5363cc3e55e0caae5a824b2e70be04eaf06fa9..63f5851b6de1899ab0c78201a671f0cb461612dc 100644 (file)
@@ -3,15 +3,15 @@
 #
 # This file is part of Hooke.
 #
-# Hooke is free software: you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation, either
-# version 3 of the License, or (at your option) any later version.
+# Hooke is free software: you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
 #
-# Hooke is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Lesser General Public License for more details.
+# Hooke is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
+# Public License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public
 # License along with Hooke.  If not, see
@@ -21,6 +21,7 @@
 """
 
 import os
+import os.path
 
 from .. import libhooke as lh
 from .. import curve as lhc
@@ -41,13 +42,12 @@ class mfp1dexportDriver(lhc.Driver):
         self.lines = list(self.filedata.readlines())
         self.filedata.close()
 
-        self.filetype='mfp1dexport'
-        self.experiment='smfs'
-
     def close_all(self):
         self.filedata.close()
 
     def is_me(self):
+        if os.path.isdir(path):
+            return False
         try:
             self.raw_header = self.lines[0:38]
         except: