From 6d39b788243fda6486e76b16b672d23fafea0ebc Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Tue, 21 Jul 2015 06:49:56 +0000 Subject: [PATCH] Add `dnf history` error for the sudo rule $ dnf history You don't have access to the history DB. --- tests/rules/test_sudo.py | 1 + thefuck/rules/sudo.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/rules/test_sudo.py b/tests/rules/test_sudo.py index af2de9f2..171088e3 100644 --- a/tests/rules/test_sudo.py +++ b/tests/rules/test_sudo.py @@ -11,6 +11,7 @@ from tests.utils import Command ('need to be root', ''), ('need root', ''), ('must be root', ''), + ('You don\'t have access to the history DB.', ''), ('', "error: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/ipaddr.py'")]) def test_match(stderr, stdout): assert match(Command(stderr=stderr, stdout=stdout), None) diff --git a/thefuck/rules/sudo.py b/thefuck/rules/sudo.py index 31687549..97b7a5e0 100644 --- a/thefuck/rules/sudo.py +++ b/thefuck/rules/sudo.py @@ -14,6 +14,7 @@ patterns = ['permission denied', 'need to be root', 'need root', 'only root can do that', + 'You don\'t have access to the history DB.', 'authentication is required']