Fix line in errros
This commit is contained in:
parent
78cbd3e90f
commit
e3b42b0725
4 changed files with 5 additions and 4 deletions
|
@ -7,7 +7,7 @@ Homepage = "https://susurrando.com"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "restic_exporter"
|
name = "restic_exporter"
|
||||||
version = "0.0.10"
|
version = "0.0.11"
|
||||||
description = "Export to node exporter the summary of a restic backup"
|
description = "Export to node exporter the summary of a restic backup"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [{ name = "Antonio J. Delgado", email = "ad@susurrando.com" }]
|
authors = [{ name = "Antonio J. Delgado", email = "ad@susurrando.com" }]
|
||||||
|
|
|
@ -77,7 +77,8 @@ class restic_exporter:
|
||||||
if 'snapshot_id' in line_data:
|
if 'snapshot_id' in line_data:
|
||||||
self.labels["snapshot_id"] = line_data['snapshot_id']
|
self.labels["snapshot_id"] = line_data['snapshot_id']
|
||||||
except json.decoder.JSONDecodeError as error:
|
except json.decoder.JSONDecodeError as error:
|
||||||
self._log.error(f"# Error decoding line '{line}'. {error}")
|
fixed_line = line.replace('\n', '')
|
||||||
|
self._log.error(f"# Error decoding line '{fixed_line}'. {error}")
|
||||||
file_stats = os.stat(json_file)
|
file_stats = os.stat(json_file)
|
||||||
self.summary['timestamp'] = round(file_stats.st_mtime * 1000)
|
self.summary['timestamp'] = round(file_stats.st_mtime * 1000)
|
||||||
self._log.debug(f"# Summary: {json.dumps(self.summary, indent=2)}")
|
self._log.debug(f"# Summary: {json.dumps(self.summary, indent=2)}")
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[metadata]
|
[metadata]
|
||||||
name = restic_exporter
|
name = restic_exporter
|
||||||
version = 0.0.10
|
version = 0.0.11
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
packages = restic_exporter
|
packages = restic_exporter
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -2,7 +2,7 @@ import setuptools
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
scripts=['restic_exporter/restic_exporter.py'],
|
scripts=['restic_exporter/restic_exporter.py'],
|
||||||
author="Antonio J. Delgado",
|
author="Antonio J. Delgado",
|
||||||
version='0.0.10',
|
version='0.0.11',
|
||||||
name='restic_exporter',
|
name='restic_exporter',
|
||||||
author_email="",
|
author_email="",
|
||||||
url="",
|
url="",
|
||||||
|
|
Loading…
Reference in a new issue