summaryrefslogtreecommitdiff
path: root/sys-apps/dstat/files/dstat-0.7.4-fix-csv-output.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /sys-apps/dstat/files/dstat-0.7.4-fix-csv-output.patch
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'sys-apps/dstat/files/dstat-0.7.4-fix-csv-output.patch')
-rw-r--r--sys-apps/dstat/files/dstat-0.7.4-fix-csv-output.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/sys-apps/dstat/files/dstat-0.7.4-fix-csv-output.patch b/sys-apps/dstat/files/dstat-0.7.4-fix-csv-output.patch
new file mode 100644
index 000000000000..e44125b0e469
--- /dev/null
+++ b/sys-apps/dstat/files/dstat-0.7.4-fix-csv-output.patch
@@ -0,0 +1,21 @@
+https://serverfault.com/questions/996996/dstat-fails-to-start-trying-to-load-python3s-csv
+
+diff --git a/dstat b/dstat
+index 9359965..1682fb5 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], (tuple, list)):
+ 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])