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 | poky-4df0d6adcaae5382009c356d750e7909a44284f6.tar.gz |
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 bafdb2a179..e5132a14fe 100644 --- a/bitbake/lib/bb/fetch/repo.py +++ b/bitbake/lib/bb/fetch/repo.py | |||
@@ -45,24 +45,11 @@ class Repo(Fetch): | |||
45 | "master". | 45 | "master". |
46 | """ | 46 | """ |
47 | 47 | ||
48 | if "protocol" in ud.parm: | 48 | ud.proto = ud.parm.get('protocol', 'git') |
49 | ud.proto = ud.parm["protocol"] | 49 | ud.branch = ud.parm.get('branch', 'master') |
50 | else: | 50 | ud.manifest = ud.parm.get('manifest', 'default.xml') |
51 | ud.proto = "git" | 51 | if not ud.manifest.endswith('.xml'): |
52 | 52 | ud.manifest += '.xml' | |
53 | if "branch" in ud.parm: | ||
54 | ud.branch = ud.parm["branch"] | ||
55 | else: | ||
56 | ud.branch = "master" | ||
57 | |||
58 | if "manifest" in ud.parm: | ||
59 | manifest = ud.parm["manifest"] | ||
60 | if manifest.endswith(".xml"): | ||
61 | ud.manifest = manifest | ||
62 | else: | ||
63 | ud.manifest = manifest + ".xml" | ||
64 | else: | ||
65 | ud.manifest = "default.xml" | ||
66 | 53 | ||
67 | ud.localfile = data.expand("repo_%s%s_%s_%s.tar.gz" % (ud.host, ud.path.replace("/", "."), ud.manifest, ud.branch), d) | 54 | ud.localfile = data.expand("repo_%s%s_%s_%s.tar.gz" % (ud.host, ud.path.replace("/", "."), ud.manifest, ud.branch), d) |
68 | 55 | ||