summaryrefslogtreecommitdiff
path: root/libmat/mat.py
diff options
context:
space:
mode:
authorjvoisin2015-08-19 18:42:28 +0200
committerjvoisin2015-08-19 18:42:28 +0200
commit7b8ec9e5ce37de7cbf0a9bc61b94cccb682cabd8 (patch)
tree2bd9232049c0956f71e254b2a99c5717360f4529 /libmat/mat.py
parent13c05f347fb3f4c9b1fcbbaf791f7cfae2219443 (diff)
Minor code simplification
Diffstat (limited to 'libmat/mat.py')
-rw-r--r--libmat/mat.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/libmat/mat.py b/libmat/mat.py
index d0fd504..f116f54 100644
--- a/libmat/mat.py
+++ b/libmat/mat.py
@@ -115,7 +115,7 @@ class XMLParser(xml.sax.handler.ContentHandler):
115def secure_remove(filename): 115def secure_remove(filename):
116 """ Securely remove the file 116 """ Securely remove the file
117 """ 117 """
118 # I want the file removed, even if it's ro 118 # I want the file removed, even if it's read-only
119 try: 119 try:
120 os.chmod(filename, 220) 120 os.chmod(filename, 220)
121 except OSError: 121 except OSError:
@@ -159,7 +159,6 @@ def create_class_file(name, backup, **kwargs):
159 logging.error('%s is empty' % name) 159 logging.error('%s is empty' % name)
160 return None 160 return None
161 161
162 filename = ''
163 try: 162 try:
164 filename = hachoir_core.cmd_line.unicodeFilename(name) 163 filename = hachoir_core.cmd_line.unicodeFilename(name)
165 except TypeError: # get rid of "decoding Unicode is not supported" 164 except TypeError: # get rid of "decoding Unicode is not supported"