def get_tab_from_uri(docs, uri): for d in docs: u = d.get_uri() if u != None and gnomevfs.uris_match(uri, u): return tab_get_from_document(d) return None
def is_duplicated_uri(uris, u): for uri in uris: if gnomevfs.uris_match(u, uri): return True return False