Fix unicode_literal issue in mac_assistive

This commit is contained in:
twangboy 2018-01-29 17:27:20 -07:00
parent 82e17e5fc8
commit ed061617a2
No known key found for this signature in database
GPG key ID: 93FF3BDEB278C9EB

View file

@ -29,14 +29,11 @@ def __virtual__():
'''
Only work on Mac OS
'''
if salt.utils.platform.is_darwin() \
and _LooseVersion(__grains__['osrelease']) >= _LooseVersion('10.9'):
return True
return (
False,
'The assistive module cannot be loaded: must be run on '
'macOS 10.9 or newer.'
)
if not salt.utils.platform.is_darwin():
return False, 'Must be run on macOS'
if not _LooseVersion(__grains__['osrelease']) >= salt.utils.stringutils.to_str('10.9'):
return False, 'Must be run on macOS 10.9 or newer'
return __virtualname__
def install(app_id, enable=True):