From 6ab8497a9aec7d2505b33e42ff52f90d8388b8a0 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Wed, 11 Apr 2012 20:44:15 -0400 Subject: [PATCH] Allow yum module to use package or name as an alias for 'pkg' --- yum | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yum b/yum index da0d5ab4922..87c2713d3e3 100755 --- a/yum +++ b/yum @@ -318,14 +318,14 @@ def main(): return 1, str(e) elif 'state' in params: - if 'pkg' not in params: + pkg = params.get('pkg', params.get('package', params.get('name', None))) + if 'pkg' is None: results['msg'] = "No pkg specified" else: try: my = yum_base(conf_file=params['conf_file'], cachedir=True) state = params['state'] - pkgspec = params['pkg'] - results = ensure(my, state, pkgspec) + results = ensure(my, state, pkg) except Exception, e: return 1, str(e)