def scan() : result = [] msg(" legacy...", newline = False) for x in entries : try : result.append( x() ) except Prophet.NotSet : pass msg(" %d apps found" % len(result)) return result
def scan(): result = [] msg(" legacy...", newline=False) for x in entries: try: result.append(x()) except Prophet.NotSet: pass msg(" %d apps found" % len(result)) return result
def scan() : """Scan through all containers and return a list of found valid entries""" global _kws result = [] msg(" desktop...", newline = False) for c in dirs : for w in os.walk(c) : _kws = _dir2kws(w[0]) if verbose > 1 : msg("\nentering " + w[0]) for x in fnmatch.filter(w[2], "*.desktop") : if verbose > 1 : msg("parsing %s..." % x, newline = False) try : result.append(App(os.path.join(w[0], x))) if verbose > 1 : msg("ok") except (NotDesktop, Prophet.NotSet), e : if verbose > 1 : msg("REJECTED : " + str(e))
def scan(): """Scan through all containers and return a list of found valid entries""" result = [] msg(" debian...", newline=False) for d in dirs: for f in glob.glob(os.path.join(d, "*")): if verbose > 1: msg("\nparsing " + f) try: entries = _parse(f) except NotSet as e: if verbose > 1: msg("REJECTED : " + str(e)) else: for e in entries: try: result.append(App(e)) except Prophet.NotSet as e: if verbose > 1: msg("REJECTED : " + str(e)) msg(" %d apps found" % len(result)) return result
def scan() : """Scan through all containers and return a list of found valid entries""" result = [] msg(" debian...", newline = False) for d in dirs : for f in glob.glob(os.path.join(d, "*")) : if verbose > 1 : msg("\nparsing " + f) try : entries = _parse(f) except NotSet, e : if verbose > 1 : msg("REJECTED : " + str(e)) else : for e in entries : try : result.append(App(e)) except Prophet.NotSet, e : if verbose > 1 : msg("REJECTED : " + str(e))
result = [] msg(" debian...", newline = False) for d in dirs : for f in glob.glob(os.path.join(d, "*")) : if verbose > 1 : msg("\nparsing " + f) try : entries = _parse(f) except NotSet, e : if verbose > 1 : msg("REJECTED : " + str(e)) else : for e in entries : try : result.append(App(e)) except Prophet.NotSet, e : if verbose > 1 : msg("REJECTED : " + str(e)) msg(" %d apps found" % len(result)) return result def _parse(debmenu) : try : file = open(debmenu) except IOError : raise NotSet("couldn't read the file " + debmenu) entry = "" entries = [] next = False try : for x in file :
def scan(): """Scan through all containers and return a list of found valid entries""" global _kws result = [] msg(" desktop...", newline=False) for c in dirs: for w in os.walk(c): _kws = _dir2kws(w[0]) if verbose > 1: msg("\nentering " + w[0]) for x in fnmatch.filter(w[2], "*.desktop"): if verbose > 1: msg("parsing %s..." % x, newline=False) try: result.append(App(os.path.join(w[0], x))) if verbose > 1: msg("ok") except (NotDesktop, Prophet.NotSet) as e: if verbose > 1: msg("REJECTED : " + str(e)) except UnicodeDecodeError: if verbose > 1: msg(".desktop UTF-8 decode issue in " + desktop) msg(" %d apps found" % len(result)) return result