We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
RedhatRelease parser failed to parse minor release version in some scenarios
In few cases where redhat_release content is something similar to below, RedhatRelease parser fails to get the minor version extracted from it

Run:
```
>>> from insights.parsers.redhat_release import RedhatRelease
>>> from insights.tests import context_wrap
>>> RedhatRelease(context_wrap("Red Hat Enterprise Linux release 7.5-0.14")).major
7
>>> RedhatRelease(context_wrap("Red Hat Enterprise Linux release 7.5-0.14")).minor
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/insights/insights-core/insights/parsers/redhat_release.py", line 59, in minor
    return int(s[1])
ValueError: invalid literal for int() with base 10: '5-0'
>>> RedhatRelease(context_wrap("Red Hat Enterprise Linux release 7.5-0.14")).version
'7.5-0.14'
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `insights/parsers/redhat_release.py`
Content:
```
1 """
2 redhat-release - File ``/etc/redhat-release``
3 =============================================
4 
5 This module provides plugins access to file ``/etc/redhat-release``
6 
7 Typical content of file ``/etc/redhat-release`` is::
8 
9     Red Hat Enterprise Linux Server release 7.2 (Maipo)
10 
11 This module parses the file content and stores data in the dict ``self.parsed``.
12 The version info can also be get via ``obj.major`` and ``obj.minor``.
13 Property ``is_rhel`` and ``is_hypervisor`` specifies the host type.
14 
15 Examples:
16     >>> rh_rls_content = '''
17     ... Red Hat Enterprise Linux Server release 7.2 (Maipo)
18     ... '''.strip()
19     >>> from insights.tests import context_wrap
20     >>> shared = {RedhatRelease: RedhatRelease(context_wrap(rh_rls_content))}
21     >>> release = shared[RedhatRelease]
22     >>> assert release.raw == rh_rls_content
23     >>> assert release.major == 7
24     >>> assert release.minor == 2
25     >>> assert release.version == "7.2"
26     >>> assert release.is_rhel
27     >>> assert release.product == "Red Hat Enterprise Linux Server"
28 """
29 from .. import Parser, parser
30 from ..specs import Specs
31 
32 
33 @parser(Specs.redhat_release)
34 class RedhatRelease(Parser):
35     """Parses the content of file ``/etc/redhat-release``."""
36 
37     def parse_content(self, content):
38         self.raw = content[0]
39         product, _, version_name = [v.strip() for v in content[0].partition("release")]
40         version_name_split = [v.strip() for v in version_name.split(None, 1)]
41         code_name = (version_name_split[1].strip("()")
42                         if len(version_name_split) > 1 else None)
43         self.parsed = {
44             "product": product,
45             "version": version_name_split[0],
46             "code_name": code_name
47         }
48 
49     @property
50     def major(self):
51         """int: the major version of this OS."""
52         return int(self.parsed["version"].split(".")[0])
53 
54     @property
55     def minor(self):
56         """int: the minor version of this OS."""
57         s = self.parsed["version"].split(".")
58         if len(s) > 1:
59             return int(s[1])
60 
61     @property
62     def version(self):
63         """string: version of this OS."""
64         return self.parsed["version"]
65 
66     @property
67     def is_rhel(self):
68         """bool: True if this OS belong to RHEL, else False."""
69         return "Red Hat Enterprise Linux" in self.parsed["product"]
70 
71     @property
72     def product(self):
73         """string: product of this OS."""
74         return self.parsed["product"]
75
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/insights/parsers/redhat_release.py b/insights/parsers/redhat_release.py
--- a/insights/parsers/redhat_release.py
+++ b/insights/parsers/redhat_release.py
@@ -54,7 +54,7 @@
     @property
     def minor(self):
         """int: the minor version of this OS."""
-        s = self.parsed["version"].split(".")
+        s = self.parsed["version"].split("-", 1)[0].split(".")
         if len(s) > 1:
             return int(s[1])

{"golden_diff": "diff --git a/insights/parsers/redhat_release.py b/insights/parsers/redhat_release.py\n--- a/insights/parsers/redhat_release.py\n+++ b/insights/parsers/redhat_release.py\n@@ -54,7 +54,7 @@\n     @property\n     def minor(self):\n         \"\"\"int: the minor version of this OS.\"\"\"\n-        s = self.parsed[\"version\"].split(\".\")\n+        s = self.parsed[\"version\"].split(\"-\", 1)[0].split(\".\")\n         if len(s) > 1:\n             return int(s[1])\n", "issue": "RedhatRelease parser failed to parse minor release version in some scenarios\nIn few cases where redhat_release content is something similar to below, RedhatRelease parser fails to get the minor version extracted from it\r\n\r\nRun:\r\n```\r\n>>> from insights.parsers.redhat_release import RedhatRelease\r\n>>> from insights.tests import context_wrap\r\n>>> RedhatRelease(context_wrap(\"Red Hat Enterprise Linux release 7.5-0.14\")).major\r\n7\r\n>>> RedhatRelease(context_wrap(\"Red Hat Enterprise Linux release 7.5-0.14\")).minor\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/opt/insights/insights-core/insights/parsers/redhat_release.py\", line 59, in minor\r\n    return int(s[1])\r\nValueError: invalid literal for int() with base 10: '5-0'\r\n>>> RedhatRelease(context_wrap(\"Red Hat Enterprise Linux release 7.5-0.14\")).version\r\n'7.5-0.14'\r\n```\n", "before_files": [{"content": "\"\"\"\nredhat-release - File ``/etc/redhat-release``\n=============================================\n\nThis module provides plugins access to file ``/etc/redhat-release``\n\nTypical content of file ``/etc/redhat-release`` is::\n\n    Red Hat Enterprise Linux Server release 7.2 (Maipo)\n\nThis module parses the file content and stores data in the dict ``self.parsed``.\nThe version info can also be get via ``obj.major`` and ``obj.minor``.\nProperty ``is_rhel`` and ``is_hypervisor`` specifies the host type.\n\nExamples:\n    >>> rh_rls_content = '''\n    ... Red Hat Enterprise Linux Server release 7.2 (Maipo)\n    ... '''.strip()\n    >>> from insights.tests import context_wrap\n    >>> shared = {RedhatRelease: RedhatRelease(context_wrap(rh_rls_content))}\n    >>> release = shared[RedhatRelease]\n    >>> assert release.raw == rh_rls_content\n    >>> assert release.major == 7\n    >>> assert release.minor == 2\n    >>> assert release.version == \"7.2\"\n    >>> assert release.is_rhel\n    >>> assert release.product == \"Red Hat Enterprise Linux Server\"\n\"\"\"\nfrom .. import Parser, parser\nfrom ..specs import Specs\n\n\n@parser(Specs.redhat_release)\nclass RedhatRelease(Parser):\n    \"\"\"Parses the content of file ``/etc/redhat-release``.\"\"\"\n\n    def parse_content(self, content):\n        self.raw = content[0]\n        product, _, version_name = [v.strip() for v in content[0].partition(\"release\")]\n        version_name_split = [v.strip() for v in version_name.split(None, 1)]\n        code_name = (version_name_split[1].strip(\"()\")\n                        if len(version_name_split) > 1 else None)\n        self.parsed = {\n            \"product\": product,\n            \"version\": version_name_split[0],\n            \"code_name\": code_name\n        }\n\n    @property\n    def major(self):\n        \"\"\"int: the major version of this OS.\"\"\"\n        return int(self.parsed[\"version\"].split(\".\")[0])\n\n    @property\n    def minor(self):\n        \"\"\"int: the minor version of this OS.\"\"\"\n        s = self.parsed[\"version\"].split(\".\")\n        if len(s) > 1:\n            return int(s[1])\n\n    @property\n    def version(self):\n        \"\"\"string: version of this OS.\"\"\"\n        return self.parsed[\"version\"]\n\n    @property\n    def is_rhel(self):\n        \"\"\"bool: True if this OS belong to RHEL, else False.\"\"\"\n        return \"Red Hat Enterprise Linux\" in self.parsed[\"product\"]\n\n    @property\n    def product(self):\n        \"\"\"string: product of this OS.\"\"\"\n        return self.parsed[\"product\"]\n", "path": "insights/parsers/redhat_release.py"}], "after_files": [{"content": "\"\"\"\nredhat-release - File ``/etc/redhat-release``\n=============================================\n\nThis module provides plugins access to file ``/etc/redhat-release``\n\nTypical content of file ``/etc/redhat-release`` is::\n\n    Red Hat Enterprise Linux Server release 7.2 (Maipo)\n\nThis module parses the file content and stores data in the dict ``self.parsed``.\nThe version info can also be get via ``obj.major`` and ``obj.minor``.\nProperty ``is_rhel`` and ``is_hypervisor`` specifies the host type.\n\nExamples:\n    >>> rh_rls_content = '''\n    ... Red Hat Enterprise Linux Server release 7.2 (Maipo)\n    ... '''.strip()\n    >>> from insights.tests import context_wrap\n    >>> shared = {RedhatRelease: RedhatRelease(context_wrap(rh_rls_content))}\n    >>> release = shared[RedhatRelease]\n    >>> assert release.raw == rh_rls_content\n    >>> assert release.major == 7\n    >>> assert release.minor == 2\n    >>> assert release.version == \"7.2\"\n    >>> assert release.is_rhel\n    >>> assert release.product == \"Red Hat Enterprise Linux Server\"\n\"\"\"\nfrom .. import Parser, parser\nfrom ..specs import Specs\n\n\n@parser(Specs.redhat_release)\nclass RedhatRelease(Parser):\n    \"\"\"Parses the content of file ``/etc/redhat-release``.\"\"\"\n\n    def parse_content(self, content):\n        self.raw = content[0]\n        product, _, version_name = [v.strip() for v in content[0].partition(\"release\")]\n        version_name_split = [v.strip() for v in version_name.split(None, 1)]\n        code_name = (version_name_split[1].strip(\"()\")\n                        if len(version_name_split) > 1 else None)\n        self.parsed = {\n            \"product\": product,\n            \"version\": version_name_split[0],\n            \"code_name\": code_name\n        }\n\n    @property\n    def major(self):\n        \"\"\"int: the major version of this OS.\"\"\"\n        return int(self.parsed[\"version\"].split(\".\")[0])\n\n    @property\n    def minor(self):\n        \"\"\"int: the minor version of this OS.\"\"\"\n        s = self.parsed[\"version\"].split(\"-\", 1)[0].split(\".\")\n        if len(s) > 1:\n            return int(s[1])\n\n    @property\n    def version(self):\n        \"\"\"string: version of this OS.\"\"\"\n        return self.parsed[\"version\"]\n\n    @property\n    def is_rhel(self):\n        \"\"\"bool: True if this OS belong to RHEL, else False.\"\"\"\n        return \"Red Hat Enterprise Linux\" in self.parsed[\"product\"]\n\n    @property\n    def product(self):\n        \"\"\"string: product of this OS.\"\"\"\n        return self.parsed[\"product\"]\n", "path": "insights/parsers/redhat_release.py"}]}