From 0fd7d1c27af5d18d7011670ac71399ef9855f0cc Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Wed, 4 Nov 2015 12:40:45 +0100 Subject: [PATCH] Add missing super() call __init__ method from base class 'GlancesStats' is not called. --- glances/core/glances_stats.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/glances/core/glances_stats.py b/glances/core/glances_stats.py index 85d4e8cd..623ca02d 100644 --- a/glances/core/glances_stats.py +++ b/glances/core/glances_stats.py @@ -248,7 +248,7 @@ class GlancesStatsServer(GlancesStats): def __init__(self, config=None): # Init the stats - GlancesStats.__init__(self, config) + super(GlancesStatsServer, self).__init__(config) # Init the all_stats dict used by the server # all_stats is a dict of dicts filled by the server @@ -259,7 +259,7 @@ class GlancesStatsServer(GlancesStats): input_stats = input_stats or {} # Force update of all the stats - GlancesStats.update(self) + super(GlancesStatsServer, self).update() # Build all_stats variable (concatenation of all the stats) self.all_stats = self._set_stats(input_stats) @@ -292,6 +292,8 @@ class GlancesStatsClient(GlancesStats): def __init__(self, config=None, args=None): """Init the GlancesStatsClient class.""" + super(GlancesStatsClient, self).__init__() + # Init the configuration self.config = config @@ -331,6 +333,8 @@ class GlancesStatsClientSNMP(GlancesStats): """This class stores, updates and gives stats for the SNMP client.""" def __init__(self, config=None, args=None): + super(GlancesStatsClientSNMP, self).__init__() + # Init the configuration self.config = config -- GitLab