diff --git a/minecraft_exporter.py b/minecraft_exporter.py index 8d28c07..1b4c69a 100644 --- a/minecraft_exporter.py +++ b/minecraft_exporter.py @@ -109,7 +109,7 @@ class MinecraftCollector(object): playerregex = re.compile("players online:(.*)") if playerregex.findall(resp): for player in playerregex.findall(resp)[0].split(","): - if player: + if player and player != "": player_online.add_sample('player_online',value=1,labels={'player':player.lstrip()}) return metrics