Commits

Chris Mutel committed f009a60

0.12.2. Ignore some warnings

Comments (0)

Files changed (5)

 Changelog
 *********
 
+0.12.2 (2014-02-04)
+===================
+
+- CHANGE: BW2Package import file ignores warnings
+
 0.12.1 (2014-02-04)
 ===================
 

bw2data/__init__.py

 # -*- coding: utf-8 -*
-__version__ = (0, 12, 1)
+__version__ = (0, 12, 2)
 
 from ._config import config
 from .meta import databases, methods, mapping, reset_meta, geomapping, \

bw2data/io/bw2package.py

 from voluptuous import Invalid
 from time import time
 import os
+import warnings
 
 
 class BW2Package(object):
 
         """
         loaded = cls.load_file(filepath, whitelist)
-        if isinstance(loaded, dict):
-            return cls._create_obj(loaded)
-        else:
-            return [cls._create_obj(o) for o in loaded]
+        with warnings.catch_warnings():
+            warnings.simplefilter("ignore")
+            if isinstance(loaded, dict):
+                return cls._create_obj(loaded)
+            else:
+                return [cls._create_obj(o) for o in loaded]
 
 
 def download_biosphere():
 # The short X.Y version.
 version = '0.12'
 # The full version, including alpha/beta/rc tags.
-release = '0.12.1'
+release = '0.12.2'
 
 import sys
 from os.path import abspath, dirname
 
 setup(
     name='bw2data',
-    version="0.12.1",
+    version="0.12.2",
     packages=packages,
     author="Chris Mutel",
     author_email="cmutel@gmail.com",