improve error handling in minecraft monitor
This commit is contained in:
parent
6b79463322
commit
772a233815
48
flake.lock
48
flake.lock
|
@ -24,11 +24,11 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"host": "git.dodsorf.as",
|
"host": "git.dodsorf.as",
|
||||||
"lastModified": 1654132489,
|
"lastModified": 1656687988,
|
||||||
"narHash": "sha256-7L6gKN5Y2PbjK2aHX2jwOCZfe9R+7RusvuULy9EbKGs=",
|
"narHash": "sha256-2ywoy3wUvFAyxDTw7VPlz5TGh9mk/um2AWOjhJqJxNQ=",
|
||||||
"owner": "Dandellion",
|
"owner": "Dandellion",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "9b6f60ce8a94d8269190dbe4ac9450f87910ac8b",
|
"rev": "7e85f62e40cd585ce81fa1f3debd5385bb0cad03",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -41,11 +41,11 @@
|
||||||
"devshell": {
|
"devshell": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1654858401,
|
"lastModified": 1655976588,
|
||||||
"narHash": "sha256-53bw34DtVJ2bnF6WEwy6Tym+qY0pNEiEwARUlvmTZjs=",
|
"narHash": "sha256-VreHyH6ITkf/1EX/8h15UqhddJnUleb0HgbC3gMkAEQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "devshell",
|
"repo": "devshell",
|
||||||
"rev": "f55e05c6d3bbe9acc7363bc8fc739518b2f02976",
|
"rev": "899ca4629020592a13a46783587f6e674179d1db",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -104,11 +104,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1655826285,
|
"lastModified": 1655975833,
|
||||||
"narHash": "sha256-dyrNTVBefSZWKdFNnAW+zUkO5bVo1colvLje4l1XXwA=",
|
"narHash": "sha256-g8sdfuglIZ24oWVbntVzniNTJW+Z3n9DNL9w9Tt+UCE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "dream2nix",
|
"repo": "dream2nix",
|
||||||
"rev": "f23add2b9c313c63dea5cff71523a850d29ffddb",
|
"rev": "4e75e665ec3a1cddae5266bed0dd72fce0b74a23",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -141,11 +141,11 @@
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1656412598,
|
"lastModified": 1659453202,
|
||||||
"narHash": "sha256-ooyXLsXj0xhlN4JTM2eXTGXZ0NnqGmL7EeU0z3HuK+o=",
|
"narHash": "sha256-dCoACB8THPLgCZtbP4AzX+l/pzhUK078zo9mQGTvFUQ=",
|
||||||
"owner": "helix-editor",
|
"owner": "helix-editor",
|
||||||
"repo": "helix",
|
"repo": "helix",
|
||||||
"rev": "ac1d8fa505e926d981682317e4e3d289bec4eb49",
|
"rev": "69f84e25165d62d0f38bcc80bf9108f9c0802cad",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -189,11 +189,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1655826649,
|
"lastModified": 1656453541,
|
||||||
"narHash": "sha256-C4/7CdB/mzuD9ayWvEA3Jcog6INCq+oUJZxUsIP/GvE=",
|
"narHash": "sha256-ZCPVnS6zJOZJvIlwU3rKR8MBVm6A3F4/0mA7G1lQ3D0=",
|
||||||
"owner": "yusdacra",
|
"owner": "yusdacra",
|
||||||
"repo": "nix-cargo-integration",
|
"repo": "nix-cargo-integration",
|
||||||
"rev": "5cf1685c021c47631a2fb16533c00c8d68afd09e",
|
"rev": "9eb74345b30cd2e536d9dac9d4435d3c475605c7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -204,11 +204,11 @@
|
||||||
},
|
},
|
||||||
"nixos-2205": {
|
"nixos-2205": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1656265786,
|
"lastModified": 1659342832,
|
||||||
"narHash": "sha256-A9RkoGrxzsmMm0vily18p92Rasb+MbdDMaSnzmywXKw=",
|
"narHash": "sha256-ePnxG4hacRd6oZMk+YeCSYMNUnHCe+qPLI0/+VaTu48=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "cd90e773eae83ba7733d2377b6cdf84d45558780",
|
"rev": "e43cf1748462c81202a32b26294e9f8eefcc3462",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -220,11 +220,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1656395221,
|
"lastModified": 1659483824,
|
||||||
"narHash": "sha256-jyt0FA2t4yBqDNX2fJJcGESL8qXrB8slOFnZmAg+5QY=",
|
"narHash": "sha256-dJutEz8UQBi+g9GMBPJXnx54xn0Ow1a/JGV9Gxd9jpw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "769f0930cec23b5fa803d2b580b14cf537f01f74",
|
"rev": "3902a6de021f928e2d0f4b71565853507a525bd1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -267,11 +267,11 @@
|
||||||
},
|
},
|
||||||
"unstable": {
|
"unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1656338871,
|
"lastModified": 1659464610,
|
||||||
"narHash": "sha256-+LOvZFt3MpWtrxXLH4igQtRVzyD43VnuTJjDVbt7phY=",
|
"narHash": "sha256-X67Sbnn4lbo+RFWDjlG9oJsSWE6zg4S+LuQ5TLB2lCo=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "819e4d63fc7f337a822a049fd055cd7615a5e0d6",
|
"rev": "f310f24f0d4cd5e8660ccde49e8cbd8dbf0295fa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -205,9 +205,12 @@ in
|
||||||
|
|
||||||
|
|
||||||
def getPlayers(server):
|
def getPlayers(server):
|
||||||
|
try:
|
||||||
status = server.status()
|
status = server.status()
|
||||||
players = getattr(getattr(status, "players"), "sample", [])
|
except:
|
||||||
return players or []
|
return []
|
||||||
|
else:
|
||||||
|
return status.players.sample or []
|
||||||
|
|
||||||
|
|
||||||
def build_players(list, server):
|
def build_players(list, server):
|
||||||
|
|
Loading…
Reference in New Issue