Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37723160
en ru br
ALT Linux repositórios
S:0.7.4-alt1
5.0: 0.6.6-alt1.1
4.1: 0.6.6-alt1.1.M41.1
4.0: 0.6.4-alt1
3.0: 0.5.8-alt1

Outros repositórios
Upstream:0.6.7

Group :: Monitoramento
RPM: dstat

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: use-python3-compatible-way-of-checking-instance-type.patch
Download


From 4afc0e352640bb278755beaab81cb2e935f5f1c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Tue, 2 Jul 2019 16:28:07 +0200
Subject: [PATCH] Use python3 compatible way of checking instance type
Previously, "dstat --output file ..." failed on python3.
---
 dstat | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dstat b/dstat
index 9359965..df37911 100755
--- a/dstat
+++ b/dstat
@@ -541,12 +541,12 @@ class dstat:
 
         line = ''
         for i, name in enumerate(self.vars):
-            if isinstance(self.val[name], types.ListType) or isinstance(self.val[name], types.TupleType):
+            if isinstance(self.val[name], (list, type)):
                 for j, val in enumerate(self.val[name]):
                     line = line + printcsv(val)
                     if j + 1 != len(self.val[name]):
                         line = line + char['sep']
-            elif isinstance(self.val[name], types.StringType):
+            elif isinstance(self.val[name], str):
                 line = line + self.val[name]
             else:
                 line = line + printcsv(self.val[name])
-- 
2.22.0
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009