diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2010-03-16 17:35:56 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2010-03-16 17:35:56 +0100 |
commit | e2e14c45690f56a7f68fe5b5a2f16640a0662ee7 (patch) | |
tree | dd33ceb156d6cc3f2fbbbca35f005ea6cb7064df /src/exiv2wrapper.cpp | |
parent | 6aa0522ffd10020117eef208330c22de14969290 (diff) | |
download | pyexiv2-e2e14c45690f56a7f68fe5b5a2f16640a0662ee7.tar.gz |
No need for a boolean to test for error.
Diffstat (limited to 'src/exiv2wrapper.cpp')
-rw-r--r-- | src/exiv2wrapper.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/exiv2wrapper.cpp b/src/exiv2wrapper.cpp index 828b13b..2bc629d 100644 --- a/src/exiv2wrapper.cpp +++ b/src/exiv2wrapper.cpp @@ -43,7 +43,6 @@ namespace exiv2wrapper void Image::_instantiate_image() { - bool success = true; Exiv2::Error error(0); // Release the GIL to allow other python threads to run @@ -56,14 +55,13 @@ void Image::_instantiate_image() } catch (Exiv2::Error& err) { - success = false; error = err; } // Re-acquire the GIL Py_END_ALLOW_THREADS - if (success) + if (error.code() == 0) { assert(_image.get() != 0); _dataRead = false; |