From 2a893b747c89dc26be22194d563e27bdc8307b60 Mon Sep 17 00:00:00 2001 From: kaliko Date: Wed, 17 Dec 2014 13:28:34 +0100 Subject: [PATCH] Ensure python 3.2 compatibility --- sima/lib/meta.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 = [] -- 2.39.5