From bd4aeefe33e63f613512604e47bfca7b2187697d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 3 Nov 2019 16:06:58 +0000 Subject: gentoo resync : 03.11.2019 --- .../fix-collections-deprecation-warning.patch | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sys-apps/dstat/files/fix-collections-deprecation-warning.patch (limited to 'sys-apps/dstat/files/fix-collections-deprecation-warning.patch') diff --git a/sys-apps/dstat/files/fix-collections-deprecation-warning.patch b/sys-apps/dstat/files/fix-collections-deprecation-warning.patch new file mode 100644 index 000000000000..e505c98d89fa --- /dev/null +++ b/sys-apps/dstat/files/fix-collections-deprecation-warning.patch @@ -0,0 +1,25 @@ +diff --git a/dstat b/dstat +index 9359965..777242f 100755 +--- a/dstat ++++ b/dstat +@@ -19,6 +19,11 @@ + from __future__ import absolute_import, division, generators, print_function + __metaclass__ = type + ++try: ++ from collections.abc import Sequence ++except ImportError: ++ from collections import Sequence ++ + import collections + import fnmatch + import getopt +@@ -512,7 +517,7 @@ class dstat: + scale = self.scales[i] + else: + scale = self.scale +- if isinstance(self.val[name], collections.Sequence) and not isinstance(self.val[name], six.string_types): ++ if isinstance(self.val[name], Sequence) and not isinstance(self.val[name], six.string_types): + line = line + cprintlist(self.val[name], ctype, self.width, scale) + sep = theme['frame'] + char['colon'] + if i + 1 != len(self.vars): -- cgit v1.2.3