From 2346b43950562260c56008b8d297da256852188b Mon Sep 17 00:00:00 2001 From: "Oleg.Peil" Date: Mon, 21 Sep 2015 11:59:04 +0200 Subject: [PATCH] Fixed import of 'json' It seems that not all distributions of python come with a 'simplejson' module. Now, if this module is not found the import falls back to module 'json'. --- python/converters/vasp/python/plotools.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/converters/vasp/python/plotools.py b/python/converters/vasp/python/plotools.py index ef6b3b34..dbe500d7 100644 --- a/python/converters/vasp/python/plotools.py +++ b/python/converters/vasp/python/plotools.py @@ -3,7 +3,10 @@ import itertools as it import numpy as np # 'simplejson' is supposed to be faster than 'json' in stdlib. -import simplejson as json +try: + import simplejson as json +except ImportError: + import json class Projector: """