Be pythonic.

Use sets.update method to add pacakge names.
This commit is contained in:
Dhananjay Balan 2014-05-05 00:00:48 +05:30 committed by Dhananjay Balan
parent 2982bfc629
commit 058d4d8627

View file

@ -83,10 +83,9 @@ class IncludePackagesInBootstrap(Task):
@classmethod @classmethod
def run(cls, info): def run(cls, info):
info.include_packages = \ info.include_packages.update(
info.include_packages.union( set(info.manifest.bootstrapper['include_packages'])
set(info.manifest.bootstrapper['include_packages']) )
)
class ExcludePackagesInBootstrap(Task): class ExcludePackagesInBootstrap(Task):
@ -96,7 +95,6 @@ class ExcludePackagesInBootstrap(Task):
@classmethod @classmethod
def run(cls, info): def run(cls, info):
info.exclude_packages = \ info.exclude_packages.update(
info.exclude_packages.union( set(info.manifest.bootstrapper['exclude_packages'])
set(info.manifest.bootstrapper['exclude_packages']) )
)