Example #1
0
 def install_file(self, file, commit=True, clear=True):
     get_logger().info('install include: %s' % file)
     tree = ET.parse(file)
     
     #Handle all includes
     for item in tree.getroot().findall("include"):
         name = item.get("name")
         if name is None:
             get_logger().warning('Only named includes are supported.')
         
         elif self.is_name_installed(name):
             get_logger().warning('Include name "%s" already installed' % name)
         
         else:
             self.add_include(name, item)
     
     #If a save was requested
     if commit:
         self.__doc_cache.write_all()
         
         #If we where requested to clear the cached docs
         if clear:
             self.__doc_cache.clear_all()
Example #2
0
    def install_file(self, file, commit=True, clear=True):
        get_logger().info('install include: %s' % file)
        tree = ET.parse(file)

        # Handle all includes
        for item in tree.getroot().findall("include"):
            name = item.get("name")
            if name is None:
                get_logger().warning('Only named includes are supported.')

            elif self.is_name_installed(name):
                get_logger().warning('Include name "%s" already installed' %
                                     name)

            else:
                self.add_include(name, item)

        # If a save was requested
        if commit:
            self.__doc_cache.write_all()

            # If we where requested to clear the cached docs
            if clear:
                self.__doc_cache.clear_all()
Example #3
0
 def remove_installed_fonts(self):
     for item in self.__installed_fonts:
         if not try_remove_file(item):
             get_logger().error(
                 'Failed removing font file "%s". XBMC may still be using it.' % item
             )
Example #4
0
 def remove_installed_fonts(self):
     for item in self.__installed_fonts:
         if not try_remove_file(item):
             get_logger().error(
                 'Failed removing font file "%s". XBMC may still be using it.'
                 % item)