From: kaliko Date: Wed, 17 Dec 2014 12:28:34 +0000 (+0100) Subject: Ensure python 3.2 compatibility X-Git-Tag: 0.13.0~7 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=2a893b747c89dc26be22194d563e27bdc8307b60;p=mpd-sima.git Ensure python 3.2 compatibility --- diff --git a/sima/lib/meta.py b/sima/lib/meta.py index 5c439c5..cf13096 100644 --- a/sima/lib/meta.py +++ b/sima/lib/meta.py @@ -21,7 +21,10 @@ Defines some object to handle audio file metadata """ -import collections.abc # python >= 3.3 +try: + from collections.abc import Set # python >= 3.3 +except ImportError: + from collections import Set # python 3.2 import logging import re @@ -159,7 +162,7 @@ class Artist(Meta): mbid = kwargs.get('musicbrainz_albumartistid').split(', ')[0] super().__init__(name=name, mbid=mbid) -class MetaContainer(collections.abc.Set): +class MetaContainer(Set): def __init__(self, iterable): self.elements = lst = []