From 51145d73da291e52b626bdf6a55b4a047af688d1 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 22 Sep 2011 18:17:49 +0200 Subject: Remove a useless function --- mat/mat.py | 15 +++------------ 1 file 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): logging.error('Unable to remove %s' % filename) -def is_secure(filename): - ''' - Prevent shell injection - ''' - if not(os.path.isfile(filename)): # check if the file exist - logging.error('%s is not a valid file' % filename) - return False - else: - return True - - def create_class_file(name, backup, add2archive): ''' return a $FILETYPEStripper() class, corresponding to the filetype of the given file ''' - if not is_secure(name): + if not os.path.isfile(name): + # check if the file exists + logging.error('%s is not a valid file' % name) return filename = '' -- cgit v1.3