djeuscan: in scan_metadata, if packages=None, skip packages scan

But if packages=[], scan all packages.

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
This commit is contained in:
Corentin Chary 2012-07-24 07:59:40 +02:00
parent 9617fd25a1
commit 5d39cbf2fd

View File

@ -160,6 +160,7 @@ class ScanMetadata(object):
maintainer = self.store_maintainer( maintainer = self.store_maintainer(
maintainer_name, maintainer_email maintainer_name, maintainer_email
) )
herd.maintainers.add(maintainer) herd.maintainers.add(maintainer)
@ -169,7 +170,7 @@ def scan_metadata(packages=None, category=None, logger=None, populate=False):
if category: if category:
packages = Package.objects.filter(category=category) packages = Package.objects.filter(category=category)
elif not packages: elif packages == None:
packages = Package.objects.all() packages = Package.objects.all()
if populate: if populate: