summaryrefslogtreecommitdiff
path: root/mat
diff options
context:
space:
mode:
authorjvoisin2012-02-06 02:05:05 +0100
committerjvoisin2012-02-06 02:05:05 +0100
commit2cba152e7c00ff2c422d5e1c911f17ea07f346ed (patch)
treee83a362b8f49f72b0457af7fd566ea37f9815b14 /mat
parentc71999c4f789beb8812f9570926f894ac9f1938e (diff)
Merge the two processing mode into a unique one
Diffstat (limited to 'mat')
-rwxr-xr-xmat15
1 files changed, 0 insertions, 15 deletions
diff --git a/mat b/mat
index ef83d84..468c76a 100755
--- a/mat
+++ b/mat
@@ -26,8 +26,6 @@ The default behaviour is to clean files given in argument')
26 help='Keep a backup copy') 26 help='Keep a backup copy')
27 options.add_option('--force', '-f', action='store_true', default=False, 27 options.add_option('--force', '-f', action='store_true', default=False,
28 help='Don\'t check if files are clean before cleaning') 28 help='Don\'t check if files are clean before cleaning')
29 options.add_option('--strict', '-u', action='store_true', default=False,
30 help='Strict cleaning mode : loss can occur')
31 29
32 info = optparse.OptionGroup(parser, 'Informations') 30 info = optparse.OptionGroup(parser, 'Informations')
33 info.add_option('--check', '-c', action='store_true', default=False, 31 info.add_option('--check', '-c', action='store_true', default=False,
@@ -97,17 +95,6 @@ def clean_meta(class_file, filename, force):
97 else: 95 else:
98 print('Unable to clean %s', filename) 96 print('Unable to clean %s', filename)
99 97
100def clean_meta_strict(class_file, filename, force):
101 '''
102 Clean the file 'filename', strict way
103 '''
104 print('[+] Cleaning %s' % filename)
105 if force is False and class_file.is_clean():
106 print('%s is already clean' % filename)
107 else:
108 class_file.remove_all_strict()
109 print('%s cleaned' % filename)
110
111 98
112def list_supported(): 99def list_supported():
113 ''' 100 '''
@@ -142,8 +129,6 @@ def main():
142 func = list_meta 129 func = list_meta
143 elif args.check is True: # only check if the file is clean 130 elif args.check is True: # only check if the file is clean
144 func = is_clean 131 func = is_clean
145 elif args.strict is True: # destructive anonymisation method
146 func = clean_meta_strict
147 elif args.list is True: # print the list of all supported format 132 elif args.list is True: # print the list of all supported format
148 list_supported() 133 list_supported()
149 else: # clean the file 134 else: # clean the file