From f465fb3ed8be496e057b0d9e008dca7e9b96f2d6 Mon Sep 17 00:00:00 2001 From: Stef Pletinck Date: Thu, 5 Oct 2017 16:50:44 +0200 Subject: [PATCH] Slightly more comments --- thefuck/rules/dnf_no_such_command.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/thefuck/rules/dnf_no_such_command.py b/thefuck/rules/dnf_no_such_command.py index 27d353a..70c7939 100644 --- a/thefuck/rules/dnf_no_such_command.py +++ b/thefuck/rules/dnf_no_such_command.py @@ -15,6 +15,9 @@ def match(command): def _parse_operations(help_text_lines): + # The regex has to be a bytes-style regex since reading from a file + # like stdin returns a bytes-style object and a string-style regex + # wouldn't work. operation_regex = re.compile(b'^([a-z-]+) +', re.MULTILINE) return operation_regex.findall(help_text_lines)