diff options
| author | jvoisin | 2014-04-01 13:45:29 +0100 |
|---|---|---|
| committer | jvoisin | 2014-04-01 13:45:29 +0100 |
| commit | 73c1250aa1961f12d52e3af09fc470074504ac25 (patch) | |
| tree | fb06cdce2e5b5b5a69da779470476cc27bd5279e | |
| parent | 4b98c4ef651a3cb05e21504f7c9477c49d393a70 (diff) | |
Fix style elements
| -rwxr-xr-x | mat | 22 |
1 files changed, 9 insertions, 13 deletions
| @@ -71,8 +71,7 @@ def list_meta(class_file, filename, add2archive): | |||
| 71 | 71 | ||
| 72 | 72 | ||
| 73 | def is_clean(class_file, filename, add2archive): | 73 | def is_clean(class_file, filename, add2archive): |
| 74 | ''' Tell if 'filename' is clean or not | 74 | ''' Tell if 'filename' is clean or not ''' |
| 75 | ''' | ||
| 76 | if class_file.is_clean(): | 75 | if class_file.is_clean(): |
| 77 | print('[+] %s is clean' % filename) | 76 | print('[+] %s is clean' % filename) |
| 78 | else: | 77 | else: |
| @@ -81,8 +80,7 @@ def is_clean(class_file, filename, add2archive): | |||
| 81 | 80 | ||
| 82 | 81 | ||
| 83 | def clean_meta(class_file, filename, add2archive): | 82 | def clean_meta(class_file, filename, add2archive): |
| 84 | ''' Clean the file 'filename' | 83 | ''' Clean the file 'filename' ''' |
| 85 | ''' | ||
| 86 | if not class_file.is_writable: | 84 | if not class_file.is_writable: |
| 87 | print('[-] %s is not writable' % filename) | 85 | print('[-] %s is not writable' % filename) |
| 88 | return 1 | 86 | return 1 |
| @@ -99,7 +97,7 @@ def clean_meta(class_file, filename, add2archive): | |||
| 99 | print('- %s' % i) | 97 | print('- %s' % i) |
| 100 | return 1 | 98 | return 1 |
| 101 | if class_file.remove_all(): | 99 | if class_file.remove_all(): |
| 102 | print('[+] %s cleaned !' % filename) | 100 | print('[+] %s cleaned!' % filename) |
| 103 | else: | 101 | else: |
| 104 | print('[-] Unable to clean %s', filename) | 102 | print('[-] Unable to clean %s', filename) |
| 105 | return 1 | 103 | return 1 |
| @@ -107,21 +105,19 @@ def clean_meta(class_file, filename, add2archive): | |||
| 107 | 105 | ||
| 108 | 106 | ||
| 109 | def list_supported(): | 107 | def list_supported(): |
| 110 | ''' Print all supported fileformat, and exit | 108 | ''' Print all supported fileformat, and exit ''' |
| 111 | ''' | ||
| 112 | for item in mat.list_supported_formats(): | 109 | for item in mat.list_supported_formats(): |
| 113 | print('%s (%s)' % (item['name'], item['extension'])) | 110 | print('%s (%s)' % (item['name'], item['extension'])) |
| 114 | print('\tsupport : ' + item['support']) | 111 | print('\tsupport : %s' % item['support']) |
| 115 | print('\tmetadata : ' + item['metadata']) | 112 | print('\tmetadata : %s' % item['metadata']) |
| 116 | print('\tmethod : ' + item['method']) | 113 | print('\tmethod : %s' % item['method']) |
| 117 | print('\tremaining : ' + item['remaining']) | 114 | print('\tremaining : %s' % item['remaining']) |
| 118 | print('\n') | 115 | print('\n') |
| 119 | sys.exit(0) | 116 | sys.exit(0) |
| 120 | 117 | ||
| 121 | 118 | ||
| 122 | def main(): | 119 | def main(): |
| 123 | ''' Main function : get args and launch the appropriate function | 120 | ''' Main function : get args and launch the appropriate function ''' |
| 124 | ''' | ||
| 125 | args, filenames = parse() | 121 | args, filenames = parse() |
| 126 | 122 | ||
| 127 | #func receives the function corresponding to the options given as parameters | 123 | #func receives the function corresponding to the options given as parameters |
