예제 #1
0
 def reload_scripts(self, subcall=None):
     """
     Return list with single downloaded and installed file
     """
     script = None
     if subcall: subcall((0, 1))
     data = self.config.download(self.path)
     if not data:
         return []
     name = urlparse(self.path)[2].split('/')[-1]
     installed_path = self.config.install_script(name, data)
     if installed_path:
         script = Script()
         script.load_file(installed_path)
         script.url = self.path
     if subcall: subcall((1, 1))
     if not script:
         return []
     return [script]
예제 #2
0
 def reload_scripts(self, subcall = None):
     """
     Return list with single downloaded and installed file
     """
     script = None
     if subcall: subcall((0, 1))
     data = self.config.download(self.path)
     if not data:
         return []
     name = urlparse(self.path)[2].split('/')[-1]
     installed_path = self.config.install_script(name, data)
     if installed_path:
         script = Script()
         script.load_file(installed_path)
         script.url = self.path
     if subcall: subcall((1, 1))
     if not script:
         return []
     return [script]