summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2011-09-22 18:17:49 +0200
committerjvoisin2011-09-22 18:17:49 +0200
commit51145d73da291e52b626bdf6a55b4a047af688d1 (patch)
treefe4b0b39c2b51828e05f047a4acf436b9cd50f52
parentdab7faf9f994e6cafa914e515396a537ce2a61ab (diff)
Remove a useless function
-rw-r--r--mat/mat.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/mat/mat.py b/mat/mat.py
index 4e959d4..7c8b0dd 100644
--- a/mat/mat.py
+++ b/mat/mat.py
@@ -132,23 +132,14 @@ def secure_remove(filename):
132 logging.error('Unable to remove %s' % filename) 132 logging.error('Unable to remove %s' % filename)
133 133
134 134
135def is_secure(filename):
136 '''
137 Prevent shell injection
138 '''
139 if not(os.path.isfile(filename)): # check if the file exist
140 logging.error('%s is not a valid file' % filename)
141 return False
142 else:
143 return True
144
145
146def create_class_file(name, backup, add2archive): 135def create_class_file(name, backup, add2archive):
147 ''' 136 '''
148 return a $FILETYPEStripper() class, 137 return a $FILETYPEStripper() class,
149 corresponding to the filetype of the given file 138 corresponding to the filetype of the given file
150 ''' 139 '''
151 if not is_secure(name): 140 if not os.path.isfile(name):
141 # check if the file exists
142 logging.error('%s is not a valid file' % name)
152 return 143 return
153 144
154 filename = '' 145 filename = ''