Don't parse empty lines

This commit is contained in:
Mikko Ahlroth 2023-09-02 23:56:20 +03:00
parent c92f8e4ff4
commit 4e0d192894
2 changed files with 2 additions and 1 deletions

View file

@ -108,6 +108,7 @@ defmodule Tietopaketti.Sysmon do
with {:ok, content} <- File.read(ProcDiskstats.path()),
lines <- String.split(content, "\n") do
for line <- lines,
line != "",
parsed = ProcDiskstats.parse_line(line),
Map.has_key?(state.paths_by_block, parsed.block),
reduce: %{} do

View file

@ -4,7 +4,7 @@ defmodule Tietopaketti.MixProject do
def project do
[
app: :tietopaketti,
version: "1.2.3",
version: "1.2.4",
elixir: "~> 1.15",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,