djeuscan: fix some small bugs
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
This commit is contained in:
parent
d1058aed8b
commit
97830775c8
@ -44,7 +44,7 @@ def packages_from_names(data):
|
||||
data = data.replace("\r", "")
|
||||
|
||||
for pkg in data.split('\n'):
|
||||
if '/' in pkg:
|
||||
if pkg.count('/') == 1:
|
||||
cat, pkg = pkg.split('/')
|
||||
packages.extend(Package.objects.filter(category=cat, name=pkg))
|
||||
else:
|
||||
|
@ -26,7 +26,7 @@ class ScanMetadata(object):
|
||||
|
||||
try:
|
||||
category, package = portage.catsplit(query)
|
||||
return Package.objects.get(category=package, name=package)
|
||||
return Package.objects.get(category=category, name=package)
|
||||
except Package.DoesNotExist:
|
||||
pass
|
||||
|
||||
@ -88,7 +88,6 @@ class ScanMetadata(object):
|
||||
return pkg, package.metadata
|
||||
|
||||
def scan(self, query=None, pkg=None):
|
||||
|
||||
try:
|
||||
metadata = None
|
||||
pkg, metadata = self.metadata_from_db(query, pkg)
|
||||
|
@ -154,8 +154,7 @@ def scan_upstream(packages=[], purge_versions=False):
|
||||
logger.info("Starting upstream scan subtask for %d packages...",
|
||||
len(packages))
|
||||
else:
|
||||
logger.info("Starting upstream scan...",
|
||||
len(packages))
|
||||
logger.info("Starting upstream scan...")
|
||||
|
||||
scan.scan_upstream(
|
||||
packages=packages,
|
||||
|
Loading…
Reference in New Issue
Block a user