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/perforce.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'bitbake/lib/bb/fetch/perforce.py') diff --git a/bitbake/lib/bb/fetch/perforce.py b/bitbake/lib/bb/fetch/perforce.py index bdd23deef5..222ed7eaaa 100644 --- a/bitbake/lib/bb/fetch/perforce.py +++ b/bitbake/lib/bb/fetch/perforce.py @@ -133,10 +133,7 @@ class Perforce(Fetch): else: path = depot - if "module" in parm: - module = parm["module"] - else: - module = os.path.basename(path) + module = parm.get('module', os.path.basename(path)) localdata = data.createCopy(d) data.setVar('OVERRIDES', "p4:%s" % data.getVar('OVERRIDES', localdata), localdata) @@ -206,4 +203,4 @@ class Perforce(Fetch): pass raise FetchError(module) # cleanup - os.system('rm -rf %s' % tmpfile) + bb.utils.prunedir(tmpfile) -- cgit v1.2.3