diff options
| author | jvoisin | 2013-07-16 12:42:47 +0200 |
|---|---|---|
| committer | jvoisin | 2013-07-16 12:42:47 +0200 |
| commit | fb0e2fa10b94b22a792e756e996b09436f472b0d (patch) | |
| tree | 6e254445a133a824319f7e74aaa66991346110cb /MAT | |
| parent | cd1405fc3994fda52d266811ff07f7021931df9d (diff) | |
Gramatical and spelling corrections
Diffstat (limited to 'MAT')
| -rw-r--r-- | MAT/archive.py | 6 | ||||
| -rw-r--r-- | MAT/images.py | 4 | ||||
| -rw-r--r-- | MAT/mat.py | 10 | ||||
| -rw-r--r-- | MAT/misc.py | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/MAT/archive.py b/MAT/archive.py index 59629ac..f7b5783 100644 --- a/MAT/archive.py +++ b/MAT/archive.py | |||
| @@ -68,7 +68,7 @@ class ZipStripper(GenericArchiveStripper): | |||
| 68 | for item in zipin.infolist(): | 68 | for item in zipin.infolist(): |
| 69 | # I have not found a way to remove the crap added by zipfile :/ | 69 | # I have not found a way to remove the crap added by zipfile :/ |
| 70 | # if not self.is_file_clean(item): | 70 | # if not self.is_file_clean(item): |
| 71 | # logging.debug('%s from %s has compromizing zipinfo' % | 71 | # logging.debug('%s from %s has compromising zipinfo' % |
| 72 | # (item.filename, self.filename)) | 72 | # (item.filename, self.filename)) |
| 73 | # return False | 73 | # return False |
| 74 | zipin.extract(item, self.tempdir) | 74 | zipin.extract(item, self.tempdir) |
| @@ -114,7 +114,7 @@ harmless format' % item.filename) | |||
| 114 | So far, the zipfile module does not allow to write a ZipInfo | 114 | So far, the zipfile module does not allow to write a ZipInfo |
| 115 | object into a zipfile (and it's a shame !) : so data added | 115 | object into a zipfile (and it's a shame !) : so data added |
| 116 | by zipfile itself could not be removed. It's a big concern. | 116 | by zipfile itself could not be removed. It's a big concern. |
| 117 | Is shiping a patched version of zipfile.py a good idea ? | 117 | Is shipping a patched version of zipfile.py a good idea ? |
| 118 | ''' | 118 | ''' |
| 119 | zipin = zipfile.ZipFile(self.filename, 'r') | 119 | zipin = zipfile.ZipFile(self.filename, 'r') |
| 120 | zipout = zipfile.ZipFile(self.output, 'w', allowZip64=True) | 120 | zipout = zipfile.ZipFile(self.output, 'w', allowZip64=True) |
| @@ -218,7 +218,7 @@ class TarStripper(GenericArchiveStripper): | |||
| 218 | tarin.close() | 218 | tarin.close() |
| 219 | return False | 219 | return False |
| 220 | except: | 220 | except: |
| 221 | logging.error('%s\'s foramt is not supported or harmless' % | 221 | logging.error('%s\'s format is not supported or harmless' % |
| 222 | item.filename) | 222 | item.filename) |
| 223 | _, ext = os.path.splitext(name) | 223 | _, ext = os.path.splitext(name) |
| 224 | if ext not in parser.NOMETA: | 224 | if ext not in parser.NOMETA: |
diff --git a/MAT/images.py b/MAT/images.py index 236d566..55c1a90 100644 --- a/MAT/images.py +++ b/MAT/images.py | |||
| @@ -11,7 +11,7 @@ class JpegStripper(parser.GenericParser): | |||
| 11 | ''' | 11 | ''' |
| 12 | def _should_remove(self, field): | 12 | def _should_remove(self, field): |
| 13 | ''' | 13 | ''' |
| 14 | return True if the field is compromizing | 14 | return True if the field is compromising |
| 15 | ''' | 15 | ''' |
| 16 | field_list = frozenset(['start_image', 'app0', 'start_frame', | 16 | field_list = frozenset(['start_image', 'app0', 'start_frame', |
| 17 | 'start_scan', 'data', 'end_image']) | 17 | 'start_scan', 'data', 'end_image']) |
| @@ -31,7 +31,7 @@ class PngStripper(parser.GenericParser): | |||
| 31 | ''' | 31 | ''' |
| 32 | def _should_remove(self, field): | 32 | def _should_remove(self, field): |
| 33 | ''' | 33 | ''' |
| 34 | return True if the field is compromizing | 34 | return True if the field is compromising |
| 35 | ''' | 35 | ''' |
| 36 | field_list = frozenset(['id', 'header', 'physical', 'end']) | 36 | field_list = frozenset(['id', 'header', 'physical', 'end']) |
| 37 | if field.name in field_list: | 37 | if field.name in field_list: |
| @@ -50,7 +50,7 @@ def get_datadir(): | |||
| 50 | 50 | ||
| 51 | def list_supported_formats(): | 51 | def list_supported_formats(): |
| 52 | ''' | 52 | ''' |
| 53 | Return a list of all localy supported fileformat | 53 | Return a list of all locally supported fileformat |
| 54 | ''' | 54 | ''' |
| 55 | handler = XMLParser() | 55 | handler = XMLParser() |
| 56 | parser = xml.sax.make_parser() | 56 | parser = xml.sax.make_parser() |
| @@ -79,7 +79,7 @@ class XMLParser(xml.sax.handler.ContentHandler): | |||
| 79 | 79 | ||
| 80 | def startElement(self, name, attrs): | 80 | def startElement(self, name, attrs): |
| 81 | ''' | 81 | ''' |
| 82 | Called when entering into xml balise | 82 | Called when entering into xml tag |
| 83 | ''' | 83 | ''' |
| 84 | self.between = True | 84 | self.between = True |
| 85 | self.key = name | 85 | self.key = name |
| @@ -87,7 +87,7 @@ class XMLParser(xml.sax.handler.ContentHandler): | |||
| 87 | 87 | ||
| 88 | def endElement(self, name): | 88 | def endElement(self, name): |
| 89 | ''' | 89 | ''' |
| 90 | Called when exiting a xml balise | 90 | Called when exiting a xml tag |
| 91 | ''' | 91 | ''' |
| 92 | if name == 'format': # exiting a fileformat section | 92 | if name == 'format': # exiting a fileformat section |
| 93 | self.list.append(self.dict.copy()) | 93 | self.list.append(self.dict.copy()) |
| @@ -99,7 +99,7 @@ class XMLParser(xml.sax.handler.ContentHandler): | |||
| 99 | 99 | ||
| 100 | def characters(self, characters): | 100 | def characters(self, characters): |
| 101 | ''' | 101 | ''' |
| 102 | Concatenate the content between opening and closing balises | 102 | Concatenate the content between opening and closing tags |
| 103 | ''' | 103 | ''' |
| 104 | if self.between: | 104 | if self.between: |
| 105 | self.content += characters | 105 | self.content += characters |
| @@ -142,7 +142,7 @@ def create_class_file(name, backup, **kwargs): | |||
| 142 | 142 | ||
| 143 | if not os.access(name, os.W_OK): | 143 | if not os.access(name, os.W_OK): |
| 144 | #check write permission | 144 | #check write permission |
| 145 | logging.error('%s is not writtable' % name) | 145 | logging.error('%s is not writable' % name) |
| 146 | return None | 146 | return None |
| 147 | 147 | ||
| 148 | if not os.path.getsize(name): | 148 | if not os.path.getsize(name): |
diff --git a/MAT/misc.py b/MAT/misc.py index 582f34e..4c104a8 100644 --- a/MAT/misc.py +++ b/MAT/misc.py | |||
| @@ -47,7 +47,7 @@ class TorrentStripper(parser.GenericParser): | |||
| 47 | 47 | ||
| 48 | def remove_all(self): | 48 | def remove_all(self): |
| 49 | ''' | 49 | ''' |
| 50 | Remove all the files that are compromizing | 50 | Remove all the files that are compromising |
| 51 | ''' | 51 | ''' |
| 52 | with open(self.filename, 'r') as f: | 52 | with open(self.filename, 'r') as f: |
| 53 | decoded = bencode.bdecode(f.read()) | 53 | decoded = bencode.bdecode(f.read()) |
