diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-10-15 06:14:11 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-10-15 06:14:11 +0900 |
commit | d54ddb790c01b7396bc0fd7baae8fbe5cc64586a (patch) | |
tree | 48cb5d375f8dc6207261400810e7190c6260baff /buildstream | |
parent | 963098df8170185d367c8c7f3edceba5fc4c6e78 (diff) | |
download | buildstream-d54ddb790c01b7396bc0fd7baae8fbe5cc64586a.tar.gz |
_ostree.py: Fix error handling to handle GLib.Error
Diffstat (limited to 'buildstream')
-rw-r--r-- | buildstream/_ostree.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/buildstream/_ostree.py b/buildstream/_ostree.py index d6e8c9ef5..a5029a690 100644 --- a/buildstream/_ostree.py +++ b/buildstream/_ostree.py @@ -153,16 +153,12 @@ def commit(repo, dir, ref, branch=None): # complete repo transaction repo.commit_transaction(None) - except GLib.IOError as e: + except GLib.GError as e: # Reraise any error as a buildstream error repo.abort_transaction() raise OSTreeError(e.message) from e - except: - repo.abort_transaction() - raise - # set_ref(): # |