serverwatcher 5.29__tar.gz → 5.30__tar.gz
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.
- {serverwatcher-5.29/src/serverwatcher.egg-info → serverwatcher-5.30}/PKG-INFO +1 -1
- {serverwatcher-5.29 → serverwatcher-5.30}/pyproject.toml +1 -1
- serverwatcher-5.30/src/serverwatcher/__main__.py +47 -0
- {serverwatcher-5.29 → serverwatcher-5.30}/src/serverwatcher/validator.py +6 -2
- {serverwatcher-5.29 → serverwatcher-5.30/src/serverwatcher.egg-info}/PKG-INFO +1 -1
- serverwatcher-5.29/src/serverwatcher/__main__.py +0 -34
- {serverwatcher-5.29 → serverwatcher-5.30}/LICENSE +0 -0
- {serverwatcher-5.29 → serverwatcher-5.30}/README.md +0 -0
- {serverwatcher-5.29 → serverwatcher-5.30}/setup.cfg +0 -0
- {serverwatcher-5.29 → serverwatcher-5.30}/src/serverwatcher/__init__.py +0 -0
- {serverwatcher-5.29 → serverwatcher-5.30}/src/serverwatcher/configclasses/__init__.py +0 -0
- {serverwatcher-5.29 → serverwatcher-5.30}/src/serverwatcher/configclasses/config.py +0 -0
- {serverwatcher-5.29 → serverwatcher-5.30}/src/serverwatcher/configclasses/messages.py +0 -0
- {serverwatcher-5.29 → serverwatcher-5.30}/src/serverwatcher/configclasses/watcher.py +0 -0
- {serverwatcher-5.29 → serverwatcher-5.30}/src/serverwatcher/defaultconfigs/config.yaml +0 -0
- {serverwatcher-5.29 → serverwatcher-5.30}/src/serverwatcher/defaultconfigs/messages.yaml +0 -0
- {serverwatcher-5.29 → serverwatcher-5.30}/src/serverwatcher/defaultconfigs/watcher.yaml +0 -0
- {serverwatcher-5.29 → serverwatcher-5.30}/src/serverwatcher/watcher.py +0 -0
- {serverwatcher-5.29 → serverwatcher-5.30}/src/serverwatcher.egg-info/SOURCES.txt +0 -0
- {serverwatcher-5.29 → serverwatcher-5.30}/src/serverwatcher.egg-info/dependency_links.txt +0 -0
- {serverwatcher-5.29 → serverwatcher-5.30}/src/serverwatcher.egg-info/requires.txt +0 -0
- {serverwatcher-5.29 → serverwatcher-5.30}/src/serverwatcher.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from .watcher import ServerWatcher
|
|
2
|
+
from .validator import validate_all
|
|
3
|
+
from hungerlib import (
|
|
4
|
+
ValidationError,
|
|
5
|
+
FatalError,
|
|
6
|
+
TypeMismatchError,
|
|
7
|
+
FallbackError,
|
|
8
|
+
RecommendedError,
|
|
9
|
+
)
|
|
10
|
+
import time
|
|
11
|
+
|
|
12
|
+
def main():
|
|
13
|
+
try:
|
|
14
|
+
validate_all()
|
|
15
|
+
|
|
16
|
+
except FatalError as e:
|
|
17
|
+
print("❌ FATAL CONFIG ERROR:")
|
|
18
|
+
print(e)
|
|
19
|
+
return
|
|
20
|
+
|
|
21
|
+
except TypeMismatchError as e:
|
|
22
|
+
print("❌ TYPE MISMATCH ERROR:")
|
|
23
|
+
print(e)
|
|
24
|
+
return
|
|
25
|
+
|
|
26
|
+
except FallbackError as e:
|
|
27
|
+
print("⚠️ FALLBACKS IN USE:")
|
|
28
|
+
print(e)
|
|
29
|
+
print("Continuing in 5 seconds...")
|
|
30
|
+
time.sleep(5)
|
|
31
|
+
|
|
32
|
+
except RecommendedError as e:
|
|
33
|
+
print("⚠️ RECOMMENDED KEYS MISSING:")
|
|
34
|
+
print(e)
|
|
35
|
+
print("Continuing in 5 seconds...")
|
|
36
|
+
time.sleep(5)
|
|
37
|
+
|
|
38
|
+
except ValidationError as e:
|
|
39
|
+
print("❌ CONFIG ERROR:")
|
|
40
|
+
print(e)
|
|
41
|
+
return
|
|
42
|
+
|
|
43
|
+
watcher = ServerWatcher()
|
|
44
|
+
watcher.run()
|
|
45
|
+
|
|
46
|
+
if __name__ == "__main__":
|
|
47
|
+
main()
|
|
@@ -10,8 +10,12 @@ from serverwatcher.configclasses.watcher import WatcherConfig
|
|
|
10
10
|
|
|
11
11
|
utils.clearTerminal()
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
v = Validator(
|
|
14
|
+
throw_on_required=True,
|
|
15
|
+
throw_on_type_mismatch=True,
|
|
16
|
+
throw_on_fallback=True,
|
|
17
|
+
throw_on_recommended=True,
|
|
18
|
+
)
|
|
15
19
|
|
|
16
20
|
|
|
17
21
|
def validate_global_config(c):
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
from .watcher import ServerWatcher
|
|
2
|
-
from .validator import validate_all
|
|
3
|
-
from hungerlib.utils.exceptions import (
|
|
4
|
-
ValidationError,
|
|
5
|
-
FatalValidationError,
|
|
6
|
-
ValidationFallbacks,
|
|
7
|
-
)
|
|
8
|
-
import time
|
|
9
|
-
|
|
10
|
-
def main():
|
|
11
|
-
try:
|
|
12
|
-
validate_all()
|
|
13
|
-
|
|
14
|
-
except FatalValidationError as e:
|
|
15
|
-
print("❌ FATAL CONFIG ERROR:")
|
|
16
|
-
print(e)
|
|
17
|
-
return # fully cancel
|
|
18
|
-
|
|
19
|
-
except ValidationFallbacks as e:
|
|
20
|
-
print("⚠️ CONFIG DEFAULTS IN USE:")
|
|
21
|
-
print(e)
|
|
22
|
-
print("Continuing in 5 seconds...")
|
|
23
|
-
time.sleep(5)
|
|
24
|
-
|
|
25
|
-
except ValidationError as e:
|
|
26
|
-
print("❌ CONFIG ERROR:")
|
|
27
|
-
print(e)
|
|
28
|
-
return # non-fatal but still cancel
|
|
29
|
-
|
|
30
|
-
watcher = ServerWatcher()
|
|
31
|
-
watcher.run()
|
|
32
|
-
|
|
33
|
-
if __name__ == "__main__":
|
|
34
|
-
main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|