diff --git a/SOURCES/0005-Handle-exception-in-a-python-binding-by-the-proper-function-RhBug-1870492.patch b/SOURCES/0005-Handle-exception-in-a-python-binding-by-the-proper-function-RhBug-1870492.patch
new file mode 100644
index 0000000..e1d771e
--- /dev/null
+++ b/SOURCES/0005-Handle-exception-in-a-python-binding-by-the-proper-function-RhBug-1870492.patch
@@ -0,0 +1,21 @@
+diff -u b/python/hawkey/goal-py.cpp b/python/hawkey/goal-py.cpp
+--- b/python/hawkey/goal-py.cpp
++++ b/python/hawkey/goal-py.cpp
+@@ -253,7 +253,7 @@
+     int c_value = PyObject_IsTrue(value);
+     self->goal->set_protect_running_kernel(c_value);
+     return 0;
+-} CATCH_TO_PYTHON
++} CATCH_TO_PYTHON_INT
+ 
+ static PyObject *
+ erase(_GoalObject *self, PyObject *args, PyObject *kwds) try
+@@ -645,7 +645,7 @@
+ 
+ static PyGetSetDef goal_getsetters[] = {
+     {(char*)"actions",        (getter)get_actions, NULL, NULL, NULL},
+-    {"protect_running_kernel", (getter)get_protect_running_kernel,
++    {(char*)"protect_running_kernel", (getter)get_protect_running_kernel,
+         (setter)set_protect_running_kernel, NULL, NULL},
+     {NULL}                /* sentinel */
+ };
diff --git a/SPECS/libdnf.spec b/SPECS/libdnf.spec
index bdaeea4..0f21c86 100644
--- a/SPECS/libdnf.spec
+++ b/SPECS/libdnf.spec
@@ -54,7 +54,7 @@
 
 Name:           libdnf
 Version:        %{libdnf_major_version}.%{libdnf_minor_version}.%{libdnf_micro_version}
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Library providing simplified C and Python API to libsolv
 License:        LGPLv2+
 URL:            https://github.com/rpm-software-management/libdnf
@@ -63,6 +63,7 @@ Patch1:         0001-history-Fix-dnf-history-rollback-when-a-package-was-removed
 Patch2:         0002-Add-log-file-level-main-config-option-RhBug-1802074.patch
 Patch3:         0003-Accept-double-eq-as-an-operator-in-reldeps-RhBug-1847946.patch
 Patch4:         0004-Update-translations-RhBug-1820548.patch
+Patch5:         0005-Handle-exception-in-a-python-binding-by-the-proper-function-RhBug-1870492.patch
 
 BuildRequires:  cmake
 BuildRequires:  gcc
@@ -310,6 +311,9 @@ popd
 %endif
 
 %changelog
+* Thu Aug 20 2020 Nicola Sella <nsella@redhat.com> - 0.48.0-5
+- [covscan] Handle exception in a python binding by the proper function (RhBug:1870492)
+
 * Tue Jul 28 2020 Marek Blaha <mblaha@redhat.com> - 0.48.0-4
 - Update translations (RhBug:1820548)