original_docstring:  resolve (fetch) alias content, without dependencies.
              :force: force load
              :return: string
          
docstring: resolve (fetch) alias content, without dependencies.
docstring_tokens: resolve ( fetch ) alias content without dependencies .
code: def resolve(self, force=False):
          """ resolve (fetch) alias content, without dependencies.
              :force: force load
              :return: string
          """
          if not self._resolve_content:
              if self.expired() or self.changed() or force:
                  if os.path.isfile(self._filename_alias_content):
                      undo_content = open(self._filename_alias_content, 'r').read()
                  else:
                      undo_content = ""
                  try:
                      with open(self._filename_alias_content, 'w') as f_out:
                          for item in self.items():
                              address_parser = self.get_parser()
                              if address_parser:
                                  for address in address_parser(item):
                                      if address not in self._resolve_content:
                                          # flush new alias content (without dependencies) to disk, so progress can easliy
                                          # be followed, large lists of domain names can take quite some resolve time.
                                          f_out.write('%s\n' % address)
                                          f_out.flush()
                                          # preserve addresses
                                          self._resolve_content.add(address)
                  except IOError:
                      # parse issue, keep data as-is, flush previous content to disk
                      with open(self._filename_alias_content, 'w') as f_out:
                          f_out.write(undo_content)
                      self._resolve_content = set(undo_content.split("\n"))
                  # flush md5 hash to disk
                  open(self._filename_alias_hash, 'w').write(self.uniqueid())
              else:
                  self._resolve_content = set(open(self._filename_alias_content).read().split())
          # return the addresses and networks of this alias
          return list(self._resolve_content)
code_tokens: def resolve ( self , force = False ) : if not self . _resolve_content : if self . expired ( ) or self . changed ( ) or force : if os . path . isfile ( self . _filename_alias_content ) : undo_content = open ( self . _filename_alias_content , 'r' ) . read ( ) else : undo_content = "" try : with open ( self . _filename_alias_content , 'w' ) as f_out : for item in self . items ( ) : address_parser = self . get_parser ( ) if address_parser : for address in address_parser ( item ) : if address not in self . _resolve_content : f_out . write ( '%s\n' % address ) f_out . flush ( ) self . _resolve_content . add ( address ) except IOError : with open ( self . _filename_alias_content , 'w' ) as f_out : f_out . write ( undo_content ) self . _resolve_content = set ( undo_content . split ( "\n" ) ) open ( self . _filename_alias_hash , 'w' ) . write ( self . uniqueid ( ) ) else : self . _resolve_content = set ( open ( self . _filename_alias_content ) . read ( ) . split ( ) ) return list ( self . _resolve_content )
short_docstring: resolve (fetch) alias content, without dependencies.
short_docstring_tokens: resolve ( fetch ) alias content without dependencies .
comment: """ resolve (fetch) alias content, without dependencies.
              :force: force load
              :return: string
          """$SEP$# flush new alias content (without dependencies) to disk, so progress can easliy$SEP$# be followed, large lists of domain names can take quite some resolve time.$SEP$# preserve addresses$SEP$# parse issue, keep data as-is, flush previous content to disk$SEP$# flush md5 hash to disk$SEP$# return the addresses and networks of this alias