[virt-tools-list] [PATCH 02/17] progress: Resolve W0201

Radostin Stoyanov rstoyanov1 at gmail.com
Thu Oct 25 12:37:43 UTC 2018


W0201: Attribute %r defined outside __init__

Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>
---
 virtinst/progress.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/virtinst/progress.py b/virtinst/progress.py
index 01e28640..f15b6528 100644
--- a/virtinst/progress.py
+++ b/virtinst/progress.py
@@ -95,6 +95,7 @@ class BaseMeter:
         self.text       = None
         self.size       = None
         self.start_time = None
+        self.fsize      = None
         self.last_amount_read = 0
         self.last_update_time = None
         self.re = RateEstimator()
@@ -314,6 +315,11 @@ text_progress_meter = TextMeter
 class RateEstimator:
     def __init__(self, timescale=5.0):
         self.timescale = timescale
+        self.total = None
+        self.start_time = None
+        self.last_update_time = None
+        self.last_amount_read = 0
+        self.ave_rate = None
 
     def start(self, total=None, now=None):
         if now is None: now = time.time()
-- 
2.17.2




More information about the virt-tools-list mailing list