Kaydet (Commit) 1164cc58 authored tarafından Ali Rıza Keskin's avatar Ali Rıza Keskin

Paket verisi çekme algoritmasına el atıldı

üst 57368e04
......@@ -23,6 +23,7 @@ class ItemByRepo:
def __init__(self, dbobj, compressed=False):
self.dbobj = dbobj
self.compressed = compressed
self.repolist = inary.db.repodb.RepoDB().list_repos()
def has_repo(self, repo):
return repo in self.dbobj
......@@ -35,7 +36,7 @@ class ItemByRepo:
return False
def which_repo(self, item):
for r in inary.db.repodb.RepoDB().list_repos():
for r in self.repolist:
if r in self.dbobj and item in self.dbobj[r]:
return r
......@@ -89,9 +90,9 @@ class ItemByRepo:
for item in list(self.dbobj[r].keys()):
yield str(item), str(self.dbobj[r][item])
@staticmethod
def item_repos(repo=None):
repos = inary.db.repodb.RepoDB().list_repos()
def item_repos(self,repo=None):
if repo:
repos = [repo]
return repos
return repos
else:
return self.repolist
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment