From 4df0d6adcaae5382009c356d750e7909a44284f6 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 17 Nov 2010 15:40:51 +0100 Subject: fetch: be more pythonic no functional changes (Bitbake rev: e88834fb7c6821cc29c12d296f2edd51f6eb3746) Signed-off-by: Bernhard Reutner-Fischer Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch/hg.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'bitbake/lib/bb/fetch/hg.py') diff --git a/bitbake/lib/bb/fetch/hg.py b/bitbake/lib/bb/fetch/hg.py index 0f8d9b8324..6bc261ae68 100644 --- a/bitbake/lib/bb/fetch/hg.py +++ b/bitbake/lib/bb/fetch/hg.py @@ -44,10 +44,7 @@ class Hg(Fetch): return ud.type in ['hg'] def forcefetch(self, url, ud, d): - if 'rev' in ud.parm: - revTag = ud.parm['rev'] - else: - revTag = "tip" + revTag = ud.parm.get('rev', 'tip') return revTag == "tip" def localpath(self, url, ud, d): @@ -84,9 +81,7 @@ class Hg(Fetch): basecmd = data.expand('${FETCHCMD_hg}', d) - proto = "http" - if "proto" in ud.parm: - proto = ud.parm["proto"] + proto = ud.parm.get('proto', 'http') host = ud.host if proto == "file": -- cgit v1.2.3