summaryrefslogtreecommitdiff
path: root/MAT/mat.py
diff options
context:
space:
mode:
Diffstat (limited to 'MAT/mat.py')
-rw-r--r--MAT/mat.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/MAT/mat.py b/MAT/mat.py
index c692a6a..ffe97ea 100644
--- a/MAT/mat.py
+++ b/MAT/mat.py
@@ -140,10 +140,7 @@ def create_class_file(name, backup, **kwargs):
140 logging.error('%s is is not readable' % name) 140 logging.error('%s is is not readable' % name)
141 return None 141 return None
142 142
143 if not os.access(name, os.W_OK): 143 is_writable = os.access(name, os.W_OK)
144 #check write permission
145 logging.error('%s is not writable' % name)
146 return None
147 144
148 if not os.path.getsize(name): 145 if not os.path.getsize(name):
149 #check if the file is not empty (hachoir crash on empty files) 146 #check if the file is not empty (hachoir crash on empty files)
@@ -178,4 +175,4 @@ def create_class_file(name, backup, **kwargs):
178 logging.info('Don\'t have stripper for %s format' % mime) 175 logging.info('Don\'t have stripper for %s format' % mime)
179 return None 176 return None
180 177
181 return stripper_class(filename, parser, mime, backup, **kwargs) 178 return stripper_class(filename, parser, mime, backup, is_writable, **kwargs)