serverwatcher 6.dev5__py3-none-any.whl → 6.dev7__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.
- serverwatcher/cli.py +9 -10
- {serverwatcher-6.dev5.dist-info → serverwatcher-6.dev7.dist-info}/METADATA +1 -1
- {serverwatcher-6.dev5.dist-info → serverwatcher-6.dev7.dist-info}/RECORD +6 -6
- {serverwatcher-6.dev5.dist-info → serverwatcher-6.dev7.dist-info}/WHEEL +0 -0
- {serverwatcher-6.dev5.dist-info → serverwatcher-6.dev7.dist-info}/licenses/LICENSE +0 -0
- {serverwatcher-6.dev5.dist-info → serverwatcher-6.dev7.dist-info}/top_level.txt +0 -0
serverwatcher/cli.py
CHANGED
|
@@ -150,7 +150,7 @@ def dispatch(cli: CLIBase, line: str):
|
|
|
150
150
|
|
|
151
151
|
child = cmd.children.get(child_name)
|
|
152
152
|
if child is None:
|
|
153
|
-
cli.safePrint(f'Unknown subcommand '{child_name}'')
|
|
153
|
+
cli.safePrint(f'Unknown subcommand \'{child_name}\'')
|
|
154
154
|
return
|
|
155
155
|
|
|
156
156
|
# second positional is the main argument (stat, etc.)
|
|
@@ -268,8 +268,13 @@ def stats(self: WatcherCLI, parsed: ParsedArgs):
|
|
|
268
268
|
|
|
269
269
|
|
|
270
270
|
@command.child('get')
|
|
271
|
-
def stats_get(self: WatcherCLI, stat: str,
|
|
272
|
-
|
|
271
|
+
def stats_get(self: WatcherCLI, stat: str, **kwargs):
|
|
272
|
+
|
|
273
|
+
rounding = kwargs['rounding']
|
|
274
|
+
mode = kwargs['mode']
|
|
275
|
+
raw = kwargs['raw']
|
|
276
|
+
formatted = kwargs['formatted']
|
|
277
|
+
no_formatted = kwargs['no_formatted']
|
|
273
278
|
|
|
274
279
|
@command.param('rounding', type=int, default=2)
|
|
275
280
|
def _rounding(value):
|
|
@@ -294,12 +299,7 @@ def stats_get(self: WatcherCLI, stat: str,
|
|
|
294
299
|
self.watcher.server.refresh()
|
|
295
300
|
|
|
296
301
|
gb = not raw()
|
|
297
|
-
if formatted()
|
|
298
|
-
fmt = True
|
|
299
|
-
elif no_formatted():
|
|
300
|
-
fmt = False
|
|
301
|
-
else:
|
|
302
|
-
fmt = True
|
|
302
|
+
fmt = formatted() if formatted() else not no_formatted()
|
|
303
303
|
|
|
304
304
|
unit = ''
|
|
305
305
|
match stat:
|
|
@@ -332,7 +332,6 @@ def stats_get(self: WatcherCLI, stat: str,
|
|
|
332
332
|
|
|
333
333
|
self.bprint(f'{name}: {value}{unit}')
|
|
334
334
|
|
|
335
|
-
|
|
336
335
|
# view command
|
|
337
336
|
@command('view')
|
|
338
337
|
def view(self: WatcherCLI, parsed: ParsedArgs):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
serverwatcher/__init__.py,sha256=Q_afN0XU29n48d6Gf0-LT2lLo3RiTWlHRT6rC_fYbjw,486
|
|
2
2
|
serverwatcher/__main__.py,sha256=XjGcQ_-8p4ttuVYlYEvYKUEvcAsvZUQaEA0mX0ajRbU,3097
|
|
3
|
-
serverwatcher/cli.py,sha256=
|
|
3
|
+
serverwatcher/cli.py,sha256=ABBH533mvLZLmzUDTK3dJHRSbZRDvu2e3jjaF-B4Bsg,11176
|
|
4
4
|
serverwatcher/validator.py,sha256=aD6GHOz1S5VFC93Mj89WO9vZG1bTjhg7QZbdlvQf4wo,1778
|
|
5
5
|
serverwatcher/watcher.py,sha256=ZiocJpeyhKTGOwYYak36MXNEFpLnpdl9v6BnMPGrBmM,13593
|
|
6
6
|
serverwatcher/configclasses/__init__.py,sha256=YS0KhxtAJGdMcaiFstqTRNxIPLnR7s9v3Tkt5h2uKE4,182
|
|
@@ -12,8 +12,8 @@ serverwatcher/defaultconfigs/messages.yaml,sha256=jSVEl-RYqPHhe5U5KLl8zfJtUBymvy
|
|
|
12
12
|
serverwatcher/defaultconfigs/watcher.yaml,sha256=GlAEKCuzFUSF6wWOqQLFL1CeuPltb1ltfYxFe_FUClw,723
|
|
13
13
|
serverwatcher/tests/test.py,sha256=yvt0ExSpKCwmWGs5tXS_MTmWLcEW6gCOwz0PR4_tgek,1768
|
|
14
14
|
serverwatcher/tests/test2.py,sha256=pDFB3LTZZXdrkofCF9tDGlkUzNXq3AzK225Ww6H2EAw,1702
|
|
15
|
-
serverwatcher-6.
|
|
16
|
-
serverwatcher-6.
|
|
17
|
-
serverwatcher-6.
|
|
18
|
-
serverwatcher-6.
|
|
19
|
-
serverwatcher-6.
|
|
15
|
+
serverwatcher-6.dev7.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
16
|
+
serverwatcher-6.dev7.dist-info/METADATA,sha256=bKjS5wKNfjD6QuMXLx6kDWXvhfspkEmkj0oM94IE06I,2646
|
|
17
|
+
serverwatcher-6.dev7.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
18
|
+
serverwatcher-6.dev7.dist-info/top_level.txt,sha256=8DJAf8WmmglgtZHkp8aoTriRJ2YPcS4F3DfOIkytASo,14
|
|
19
|
+
serverwatcher-6.dev7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|