diff options
| author | Julian Andres Klode <jak@debian.org> | 2010-01-15 18:14:37 +0100 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2010-01-15 18:14:37 +0100 |
| commit | a96a29c928f63a2ef6fab9705c81120685f1818d (patch) | |
| tree | 3c2d08e3f0db5878e408d475628e9dd1d4e8e778 | |
| parent | 06491fbbca339a0590ae963c69d2a78e06c0cb0a (diff) | |
| download | python-apt-a96a29c928f63a2ef6fab9705c81120685f1818d.tar.gz | |
python/apt_pkgmodule.cc: Rename remaining Acquire.result_* to Acquire.RESULT_*.
| -rw-r--r-- | apt/cache.py | 4 | ||||
| -rw-r--r-- | python/apt_pkgmodule.cc | 4 |
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)); |
