mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Chattr version py3 fix
This commit is contained in:
parent
cf88c27353
commit
169c2d56aa
2 changed files with 6 additions and 3 deletions
|
@ -172,7 +172,10 @@ def _parse_chattr_man(man):
|
|||
'''
|
||||
Parse the contents of a chattr man page to find the E2fsprogs version
|
||||
'''
|
||||
match = re.search(r'E2fsprogs version [0-9\.]+', man)
|
||||
match = re.search(
|
||||
r'E2fsprogs version [0-9\.]+',
|
||||
salt.utils.string_utils.to_str(man),
|
||||
)
|
||||
if match:
|
||||
version = match.group().strip('E2fsprogs version ')
|
||||
else:
|
||||
|
|
|
@ -2048,7 +2048,7 @@ class FileBasicsTestCase(TestCase, LoaderModuleMockMixin):
|
|||
|
||||
|
||||
class ChattrVersionTests(TestCase):
|
||||
CHATTR_MAN = (
|
||||
CHATTR_MAN = salt.utils.stringutils.to_bytes((
|
||||
'AVAILABILITY\n'
|
||||
'chattr is part of the e2fsprogs package and is available '
|
||||
'from http://e2fsprogs.sourceforge.net.\n'
|
||||
|
@ -2059,7 +2059,7 @@ class ChattrVersionTests(TestCase):
|
|||
'January 2017 '
|
||||
' '
|
||||
' CHATTR(1)'
|
||||
)
|
||||
))
|
||||
|
||||
def test__parse_chattr_version(self):
|
||||
'''
|
||||
|
|
Loading…
Add table
Reference in a new issue