mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Catch os and attribute error
This commit is contained in:
parent
050999f0aa
commit
d426f8d7db
4 changed files with 6 additions and 3 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -103,6 +103,9 @@ tests/integration/cloud/providers/pki/minions
|
|||
# Ignore nox virtualenvs
|
||||
/.nox/
|
||||
|
||||
# Ignore pyenv files
|
||||
.python-version
|
||||
|
||||
# Kitchen tests files
|
||||
.kitchen.local.yml
|
||||
kitchen.local.yml
|
||||
|
|
|
@ -15,7 +15,7 @@ try:
|
|||
import libnacl.secret # pylint: disable=unused-import
|
||||
import libnacl.sealed # pylint: disable=unused-import
|
||||
HAS_LIBNACL = True
|
||||
except ImportError:
|
||||
except (ImportError, OSError, AttributeError):
|
||||
HAS_LIBNACL = False
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
|
|
@ -19,7 +19,7 @@ try:
|
|||
import libnacl.secret # pylint: disable=unused-import
|
||||
import libnacl.sealed # pylint: disable=unused-import
|
||||
HAS_LIBNACL = True
|
||||
except ImportError:
|
||||
except (ImportError, OSError, AttributeError):
|
||||
HAS_LIBNACL = False
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ try:
|
|||
import libnacl.secret # pylint: disable=unused-import
|
||||
import libnacl.sealed # pylint: disable=unused-import
|
||||
HAS_LIBNACL = True
|
||||
except ImportError:
|
||||
except (ImportError, OSError, AttributeError):
|
||||
HAS_LIBNACL = False
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue