File 0001-Use-python3-compatible-way-of-checking-instance-type.patch of Package dstat

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
openSUSE Build Service is sponsored by