diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-21 14:18:01 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-22 09:05:05 +0000 |
commit | 5ecdab6c2589a83bbbc522074052ff4438782102 (patch) | |
tree | 21c114fe79853c5b3fbe51ad47b0e6a45f5f68ef | |
parent | 61390438aec4a1f9beb4d332821cc6cda82e0379 (diff) | |
download | openembedded-core-5ecdab6c2589a83bbbc522074052ff4438782102.tar.gz openembedded-core-5ecdab6c2589a83bbbc522074052ff4438782102.tar.bz2 openembedded-core-5ecdab6c2589a83bbbc522074052ff4438782102.zip |
package_rpm: Clean up pointless exception handling
The exception handling in this function seemed mildly crazy. Python will
given perfectly good or in several cases better information if we let its
standard traceback/exception handling happen. Remove the pointless code.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/package_rpm.bbclass | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index c978ec55d0..bde0453287 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -55,10 +55,7 @@ def write_rpm_perfiledata(srcname, d): # OE-core dependencies a.k.a. RPM requires outdepends = workdir + "/" + srcname + ".requires" - try: - dependsfile = open(outdepends, 'w') - except OSError: - bb.fatal("unable to open spec file for writing") + dependsfile = open(outdepends, 'w') dump_filerdeps('RDEPENDS', dependsfile, d) @@ -68,10 +65,7 @@ def write_rpm_perfiledata(srcname, d): # OE-core / RPM Provides outprovides = workdir + "/" + srcname + ".provides" - try: - providesfile = open(outprovides, 'w') - except OSError: - bb.fatal("unable to open spec file for writing") + providesfile = open(outprovides, 'w') dump_filerdeps('RPROVIDES', providesfile, d) @@ -620,10 +614,7 @@ python write_specfile () { spec_scriptlets_top.append('') # Write the SPEC file - try: - specfile = open(outspecfile, 'w') - except OSError: - bb.fatal("unable to open spec file for writing") + specfile = open(outspecfile, 'w') # RPMSPEC_PREAMBLE is a way to add arbitrary text to the top # of the generated spec file |