Репозитории ALT
S: | 0.7.4-alt1 |
5.1: | 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 |
Другие репозитории
Upstream: | 0.6.7 |
Группа :: Мониторинг
Пакет: dstat
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: use-python3-compatible-way-of-checking-instance-type.patch
Скачать
Скачать
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