-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove python-daemon since it uses unsupported dependency 'lockfile' Fixes: #379 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
- Loading branch information
Showing
5 changed files
with
27 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
|
||
class AnsibleRunnerException(Exception): | ||
""" Generic Runner Error """ | ||
"""Generic Runner Error""" | ||
|
||
|
||
class ConfigurationError(AnsibleRunnerException): | ||
""" Misconfiguration of Runner """ | ||
"""Misconfiguration of Runner""" | ||
|
||
|
||
class CallbackError(AnsibleRunnerException): | ||
""" Exception occurred in Callback """ | ||
"""Exception occurred in Callback""" | ||
|
||
|
||
class ProcessLockException(Exception): | ||
"""Exception occurred in Locking process using fasteners""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from contextlib import contextmanager | ||
from fasteners import InterProcessLock | ||
from ansible_runner.exceptions import ProcessLockException | ||
|
||
|
||
class TimeoutProcessLock(InterProcessLock): | ||
|
||
@contextmanager | ||
def locked(self, timeout): | ||
ok = self.acquire(timeout=timeout) | ||
if not ok: | ||
raise ProcessLockException() | ||
try: | ||
yield | ||
finally: | ||
self.release() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
pexpect>=4.5 | ||
packaging | ||
python-daemon | ||
fasteners>=0.16 | ||
pyyaml | ||
six |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,6 @@ pypsrp[kerberos,credssp] | |
pywinrm[kerberos,credssp] | ||
toml | ||
pexpect>=4.5 | ||
python-daemon | ||
fasteners>=0.16 | ||
pyyaml | ||
six |