agent-lock-cli 0.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent_lock/__init__.py +3 -0
- agent_lock/__main__.py +5 -0
- agent_lock/allow.py +40 -0
- agent_lock/cli.py +181 -0
- agent_lock/completion.py +414 -0
- agent_lock/darwin.py +276 -0
- agent_lock/discover.py +542 -0
- agent_lock/doctor.py +1347 -0
- agent_lock/errors.py +22 -0
- agent_lock/install.py +1024 -0
- agent_lock/linux.py +336 -0
- agent_lock/state.py +275 -0
- agent_lock/windows.py +706 -0
- agent_lock/wrapper.py +259 -0
- agent_lock_cli-0.1.1.dist-info/METADATA +139 -0
- agent_lock_cli-0.1.1.dist-info/RECORD +20 -0
- agent_lock_cli-0.1.1.dist-info/WHEEL +5 -0
- agent_lock_cli-0.1.1.dist-info/entry_points.txt +2 -0
- agent_lock_cli-0.1.1.dist-info/licenses/LICENSE +21 -0
- agent_lock_cli-0.1.1.dist-info/top_level.txt +1 -0
agent_lock/errors.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""Exit-code errors. Codes: 0 ok, 1 failure, 2 bad args, 3 not installed, 4 unsupported."""
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class AgentLockError(Exception):
|
|
5
|
+
def __init__(self, message, code=1):
|
|
6
|
+
super(AgentLockError, self).__init__(message)
|
|
7
|
+
self.code = code
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class UsageError(AgentLockError):
|
|
11
|
+
def __init__(self, message):
|
|
12
|
+
super(UsageError, self).__init__(message, 2)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class NotInstalled(AgentLockError):
|
|
16
|
+
def __init__(self, message="agent-lock is not installed"):
|
|
17
|
+
super(NotInstalled, self).__init__(message, 3)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class Unsupported(AgentLockError):
|
|
21
|
+
def __init__(self, message):
|
|
22
|
+
super(Unsupported, self).__init__(message, 4)
|