mirror of
https://github.com/nicolargo/glances.git
synced 2024-10-05 16:57:32 +03:00
Graph export is broken if there is no graph section in Glances configuration file #2839
This commit is contained in:
parent
f5ecbf7a1f
commit
2ee3c86e2b
@ -34,10 +34,12 @@ class Export(GlancesExport):
|
||||
|
||||
# Manage options (command line arguments overwrite configuration file)
|
||||
self.path = args.export_graph_path or self.path
|
||||
self.generate_every = int(getattr(self, 'generate_every', 0))
|
||||
self.width = int(getattr(self, 'width', 800))
|
||||
self.height = int(getattr(self, 'height', 600))
|
||||
self.style = getattr(pygal.style, getattr(self, 'style', 'DarkStyle'), pygal.style.DarkStyle)
|
||||
self.generate_every = int(getattr(self, 'generate_every', 0) or 0)
|
||||
self.width = int(getattr(self, 'width', 800) or 800)
|
||||
self.height = int(getattr(self, 'height', 600) or 600)
|
||||
self.style = (
|
||||
getattr(pygal.style, getattr(self, 'style', 'DarkStyle'), pygal.style.DarkStyle) or pygal.style.DarkStyle
|
||||
)
|
||||
|
||||
# Create export folder
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user