diff options
| author | 2009-11-15 15:41:15 +0100 | |
|---|---|---|
| committer | 2009-11-15 15:41:15 +0100 | |
| commit | bf1c269eb7586716d4cf4284afd208e597ee69d1 (patch) | |
| tree | 749de8b2ad94209a334adc88968433386fe28d69 /pyLoadCore.py | |
| parent | netload.in fix (diff) | |
| download | pyload-bf1c269eb7586716d4cf4284afd208e597ee69d1.tar.xz | |
Cleaned plugin index function
Diffstat (limited to 'pyLoadCore.py')
| -rwxr-xr-x | pyLoadCore.py | 19 | 
1 files changed, 9 insertions, 10 deletions
| diff --git a/pyLoadCore.py b/pyLoadCore.py index f913eb493..c4c5dd9f0 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -145,16 +145,15 @@ class Core(object):      def create_plugin_index(self):          for file_handler in glob(self.plugin_folder + sep + '*.py') + glob(self.plugin_folder + sep + 'DLC.pyc'): -            if file_handler != self.plugin_folder + sep + "Plugin.py": -                plugin_pattern = "" -                plugin_file = basename(file_handler).replace('.pyc', '').replace('.py', '') -                for line in open(file_handler, "r").readlines(): -                    if "props['pattern']" in line: -                        plugin_pattern = line.split("r\"")[1].split("\"")[0] -                        break -                if plugin_pattern != "": -                    self.plugins_avaible[plugin_file] = plugin_pattern -                    self.logger.debug(plugin_file + _(" added")) +            plugin_pattern = "" +            plugin_file = basename(file_handler).replace('.pyc', '').replace('.py', '') +            for line in open(file_handler, "r").readlines(): +                if "props['pattern']" in line: +                    plugin_pattern = line.split("r\"")[1].split("\"")[0] +                    break +            if plugin_pattern != "": +                self.plugins_avaible[plugin_file] = plugin_pattern +                self.logger.debug(plugin_file + _(" added"))          self.logger.info(_("created index of plugins"))      def read_links(self): | 
