Skip to content
Snippets Groups Projects
Commit 2cf832e4 authored by Sam Yates's avatar Sam Yates Committed by akuesters
Browse files

Fix import error for python2/validation scripts (#797)

Building validation data with python2 can raise an import error for `builtins`.

* Catch import error, and import from `__builtin__` instead.
parent 726328c4
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,11 @@
import json
import math
import nrn_validation as V
from builtins import range
try:
from builtins import range
except ImportError:
from __builtin__ import range
V.override_defaults_from_args()
......
......@@ -8,7 +8,11 @@ import re
import numpy as np
import neuron
from neuron import h
from builtins import range
try:
from builtins import range
except ImportError:
from __builtin__ import range
# This is super annoying: without neuron.gui, need
# to explicit load 'standard' hoc routines like 'run',
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment