diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-11-03 16:06:58 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-11-03 16:06:58 +0000 |
commit | bd4aeefe33e63f613512604e47bfca7b2187697d (patch) | |
tree | adb35b5a9a00ee7ea591ab0c987f70167c23b597 /sys-apps/dstat/files/fix-collections-deprecation-warning.patch | |
parent | 48ece6662cbd443015f5a57ae6d8cbdbd69ef37c (diff) |
gentoo resync : 03.11.2019
Diffstat (limited to 'sys-apps/dstat/files/fix-collections-deprecation-warning.patch')
-rw-r--r-- | sys-apps/dstat/files/fix-collections-deprecation-warning.patch | 25 |
1 files changed, 25 insertions, 0 deletions
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): |