diff options
Diffstat (limited to 'silx/gui/_glutils/Texture.py')
-rw-r--r-- | silx/gui/_glutils/Texture.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/silx/gui/_glutils/Texture.py b/silx/gui/_glutils/Texture.py index 0875ebe..a7fd44b 100644 --- a/silx/gui/_glutils/Texture.py +++ b/silx/gui/_glutils/Texture.py @@ -1,7 +1,7 @@ # coding: utf-8 # /*########################################################################## # -# Copyright (c) 2014-2018 European Synchrotron Radiation Facility +# Copyright (c) 2014-2019 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -29,7 +29,11 @@ __license__ = "MIT" __date__ = "04/10/2016" -import collections +try: + from collections import abc +except ImportError: # Python2 support + import collections as abc + from ctypes import c_void_p import logging @@ -93,7 +97,7 @@ class Texture(object): self.magFilter = magFilter if magFilter is not None else gl.GL_LINEAR if wrap is not None: - if not isinstance(wrap, collections.Iterable): + if not isinstance(wrap, abc.Iterable): wrap = [wrap] * self.ndim assert len(wrap) == self.ndim |