diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-01 16:50:56 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-01 23:59:54 +0100 |
commit | b3c63b3b816179b96f1ed9b5baaf6e1f1c3c7b80 (patch) | |
tree | 65590e46d491f8ab9b23429190abc6eebec34ff1 /meta/lib | |
parent | 1634fe5148b3501f2c1b75cf7fb704a2ef60424e (diff) | |
download | openembedded-core-b3c63b3b816179b96f1ed9b5baaf6e1f1c3c7b80.tar.gz openembedded-core-b3c63b3b816179b96f1ed9b5baaf6e1f1c3c7b80.tar.bz2 openembedded-core-b3c63b3b816179b96f1ed9b5baaf6e1f1c3c7b80.zip |
package_manager: Clean up horrible 'None' return values
If this fails the exception will now be raised. Lets use that and drop
all this 'None' return value ugliness.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/package_manager.py | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 5efb286f7b..994e462445 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py @@ -17,18 +17,11 @@ from oe.gpg_sign import get_signer def create_index(arg): index_cmd = arg - try: - bb.note("Executing '%s' ..." % index_cmd) - result = subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8") - except subprocess.CalledProcessError as e: - return("Index creation command '%s' failed with return code %d:\n%s" % - (e.cmd, e.returncode, e.output.decode("utf-8"))) - + bb.note("Executing '%s' ..." % index_cmd) + result = subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8") if result: bb.note(result) - return None - """ This method parse the output from the package managerand return a dictionary with the information of the packages. This is used @@ -164,9 +157,7 @@ class OpkgIndexer(Indexer): bb.note("There are no packages in %s!" % self.deploy_dir) return - result = oe.utils.multiprocess_exec(index_cmds, create_index) - if result: - bb.fatal('%s' % ('\n'.join(result))) + oe.utils.multiprocess_exec(index_cmds, create_index) if signer: feed_sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE') @@ -247,9 +238,7 @@ class DpkgIndexer(Indexer): bb.note("There are no packages in %s" % self.deploy_dir) return - result = oe.utils.multiprocess_exec(index_cmds, create_index) - if result: - bb.fatal('%s' % ('\n'.join(result))) + oe.utils.multiprocess_exec(index_cmds, create_index) if self.d.getVar('PACKAGE_FEED_SIGN') == '1': raise NotImplementedError('Package feed signing not implementd for dpkg') |