(self)
| 132 | self.repair = False |
| 133 | |
| 134 | def activate(self): |
| 135 | for p in ("HjSplit", "UnRar", "SevenZip", "UnZip", "UnTar"): |
| 136 | try: |
| 137 | module = self.pyload.pluginManager.loadModule("internal", p) |
| 138 | klass = getattr(module, p) |
| 139 | if klass.find(): |
| 140 | self.extractors.append(klass) |
| 141 | if klass.REPAIR: |
| 142 | self.repair = self.config.get('repair') |
| 143 | |
| 144 | except OSError, e: |
| 145 | if e.errno == 2: |
| 146 | self.log_warning(_("No %s installed") % p) |
| 147 | else: |
| 148 | self.log_warning(_("Could not activate: %s") % p, e) |
| 149 | |
| 150 | except Exception, e: |
| 151 | self.log_warning(_("Could not activate: %s") % p, e) |
| 152 | |
| 153 | if self.extractors: |
| 154 | self.log_debug(*["Found %s %s" % (Extractor.__name__, Extractor.VERSION) |
| 155 | for Extractor in self.extractors]) |
| 156 | self.extract_queued() #: Resume unfinished extractions |
| 157 | else: |
| 158 | self.log_info(_("No Extract plugins activated")) |
| 159 | |
| 160 | @threaded |
| 161 | def extract_queued(self, thread): |
nothing calls this directly
no test coverage detected