summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt/cache.py4
-rw-r--r--python/apt_pkgmodule.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/apt/cache.py b/apt/cache.py
index d339f377..2f097f6b 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -233,7 +233,7 @@ class Cache(object):
failed = True
# we raise a exception if the download failed or it was cancelt
- if res == fetcher.result_cancelled:
+ if res == fetcher.RESULT_CANCELLED:
raise FetchCancelledException(err_msg)
elif failed:
raise FetchFailedException(err_msg)
@@ -309,7 +309,7 @@ class Cache(object):
fetch_progress = apt.progress.FetchProgress()
res = self._cache.update(fetch_progress, self._list,
pulse_interval)
- if res == apt_pkg.Acquire.result_cancelled and raise_on_error:
+ if res == apt_pkg.Acquire.RESULT_CANCELLED and raise_on_error:
raise FetchCancelledException()
if res == apt_pkg.Acquire.RESULT_FAILED and raise_on_error:
raise FetchFailedException()
diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc
index cdd23705..56594c61 100644
--- a/python/apt_pkgmodule.cc
+++ b/python/apt_pkgmodule.cc
@@ -666,9 +666,9 @@ extern "C" void initapt_pkg()
// Acquire constants.
// some constants
- PyDict_SetItemString(PyAcquire_Type.tp_dict, "result_cancelled",
+ PyDict_SetItemString(PyAcquire_Type.tp_dict, "RESULT_CANCELLED",
Py_BuildValue("i", pkgAcquire::Cancelled));
- PyDict_SetItemString(PyAcquire_Type.tp_dict, "result_continue",
+ PyDict_SetItemString(PyAcquire_Type.tp_dict, "RESULT_CONTINUE",
Py_BuildValue("i", pkgAcquire::Continue));
PyDict_SetItemString(PyAcquire_Type.tp_dict, "RESULT_FAILED",
Py_BuildValue("i", pkgAcquire::Failed));