diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2010-11-17 15:40:51 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:41 +0000 |
commit | 4df0d6adcaae5382009c356d750e7909a44284f6 (patch) | |
tree | d3b8b48e0ded47a63c4ea65b56add754cc750126 /bitbake/lib/bb/fetch/repo.py | |
parent | b7d667f25283cddf8ff4fc9e35425a884a9f527e (diff) | |
download | openembedded-core-4df0d6adcaae5382009c356d750e7909a44284f6.tar.gz openembedded-core-4df0d6adcaae5382009c356d750e7909a44284f6.tar.bz2 openembedded-core-4df0d6adcaae5382009c356d750e7909a44284f6.tar.xz openembedded-core-4df0d6adcaae5382009c356d750e7909a44284f6.zip |
fetch: be more pythonic
no functional changes
(Bitbake rev: e88834fb7c6821cc29c12d296f2edd51f6eb3746)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/fetch/repo.py')
-rw-r--r-- | bitbake/lib/bb/fetch/repo.py | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/bitbake/lib/bb/fetch/repo.py b/bitbake/lib/bb/fetch/repo.py index bafdb2a17..e5132a14f 100644 --- a/bitbake/lib/bb/fetch/repo.py +++ b/bitbake/lib/bb/fetch/repo.py @@ -45,24 +45,11 @@ class Repo(Fetch): "master". """ - if "protocol" in ud.parm: - ud.proto = ud.parm["protocol"] - else: - ud.proto = "git" - - if "branch" in ud.parm: - ud.branch = ud.parm["branch"] - else: - ud.branch = "master" - - if "manifest" in ud.parm: - manifest = ud.parm["manifest"] - if manifest.endswith(".xml"): - ud.manifest = manifest - else: - ud.manifest = manifest + ".xml" - else: - ud.manifest = "default.xml" + ud.proto = ud.parm.get('protocol', 'git') + ud.branch = ud.parm.get('branch', 'master') + ud.manifest = ud.parm.get('manifest', 'default.xml') + if not ud.manifest.endswith('.xml'): + ud.manifest += '.xml' ud.localfile = data.expand("repo_%s%s_%s_%s.tar.gz" % (ud.host, ud.path.replace("/", "."), ud.manifest, ud.branch), d) |