Fix existing Driver.is_me's crashes if path is a directory.
[hooke.git] / hooke / driver / jpk.py
index 2cbb852d627ec5e93ccbeb928ce1dbce18b54e64..31d98104e0d22e6ba91085e894de3139e7a9db3d 100644 (file)
@@ -39,6 +39,8 @@ class JPKDriver (Driver):
         super(JPKDriver, self).__init__(name='jpk')
 
     def is_me(self, path):
+        if os.path.isdir(path):
+            return False
         if zipfile.is_zipfile(path):  # JPK file versions since at least 0.5
             with Closing(zipfile.ZipFile(path, 'r')) as f:
                 if 'header.properties' not in f.namelist():