Version-Release number of selected component: python-dnf-1.0.0-1.fc22 Additional info: reporter: libreport-2.5.1 cmdline: python2 /usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py install yumex -d 0 -q -C executable: /usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py kernel: 4.0.4-301.fc22.x86_64 runlevel: N 5 type: Python uid: 1000 Truncated backtrace: repo.py:774:load:RepoError: Cache-only enabled but no cache for 'fedora' Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py", line 189, in <module> main(sys.argv[1:]) File "/usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py", line 185, in main cli.run() File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1076, in run self._process_demands() File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 788, in _process_demands load_available_repos=lar) File "/usr/lib/python2.7/site-packages/dnf/base.py", line 238, in fill_sack self._add_repo_to_sack(r.id) File "/usr/lib/python2.7/site-packages/dnf/base.py", line 100, in _add_repo_to_sack repo.load() File "/usr/lib/python2.7/site-packages/dnf/repo.py", line 774, in load raise dnf.exceptions.RepoError(msg) RepoError: Cache-only enabled but no cache for 'fedora' Local variables in innermost frame: msg: u"Cache-only enabled but no cache for 'fedora'" self: <Repo fedora>
Created attachment 1030181 [details] File: backtrace
Created attachment 1030182 [details] File: environ
*** Bug 1242078 has been marked as a duplicate of this bug. ***
*** Bug 1248458 has been marked as a duplicate of this bug. ***
Igor, can this be fixed, please? It should catch the error and ignore it.
*** Bug 1252518 has been marked as a duplicate of this bug. ***
diff --git a/dnf/cli/completion_helper.py b/dnf/cli/completion_helper.py index bf88983..9060751 100644 --- a/dnf/cli/completion_helper.py +++ b/dnf/cli/completion_helper.py @@ -19,6 +19,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 USA +import dnf.exceptions import dnf.cli import re import sys @@ -184,7 +185,10 @@ def main(args): cli.register_command(CleanCompletionCommand) cli.register_command(HistoryCompletionCommand) cli.configure(args) - cli.run() + try: + cli.run() + except dnf.exceptions.Exception: + sys.exit(0) if __name__ == "__main__": try:
https://github.com/rpm-software-management/dnf/pull/342
Another user experienced a similar problem: Attempted to use tab-completion while doing a "dnf list libre<tabbing here" reporter: libreport-2.6.2 cmdline: python2 /usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py list list libre -d 0 -q -C event_log: 2015-08-26-22:09:10> ('report_uReport' completed successfully) executable: /usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py kernel: 4.1.6-200.fc22.x86_64 package: python-dnf-1.1.0-2.fc22 reason: repo.py:793:load:RepoError: Cache-only enabled but no cache for 'fedora' runlevel: N 5 type: Python uid: 1000
dnf-plugins-core-0.1.11-1.fc23 dnf-1.1.1-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14743
dnf-1.1.1-1.fc23, dnf-plugins-core-0.1.11-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf dnf-plugins-core'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14743
dnf-1.1.1-2.fc22 dnf-plugins-core-0.1.11-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14744
dnf-1.1.1-2.fc23 dnf-plugins-core-0.1.11-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14743
dnf-1.1.1-2.fc23, dnf-plugins-core-0.1.11-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf dnf-plugins-core'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14743
dnf-1.1.1-2.fc22, dnf-plugins-core-0.1.11-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf-plugins-core dnf'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14744
dnf-1.1.1-2.fc22, dnf-plugins-core-0.1.11-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
dnf-1.1.1-2.fc23, dnf-plugins-core-0.1.11-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.