File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 44"""
55
66
7- import sys
87import copy
98import numpy
109import pickle
1110
1211from diffpy .srreal .structureconverters import convertObjCrystCrystal
1312from diffpy .srreal .tests import logger
1413
15- # Handle renamed diffpy.structure module by importing it to a common name .
16- # TODO simplify when Python 2 support is dropped .
14+ # Deprecated in 1.3 - import of old camel-case diffpy.Structure names .
15+ # TODO drop this in version 1.4 .
1716
18- if sys . version_info [ 0 ] >= 3 :
17+ try :
1918 import diffpy .structure as mod_structure
2019 from diffpy .structure .parsers import getParser
21- else :
22- import diffpy .Structure as mod_structure
23- from diffpy .Structure .Parsers import getParser
20+ except ImportError as e :
21+ try :
22+ import diffpy .Structure as mod_structure
23+ from diffpy .Structure .Parsers import getParser
24+ except ImportError :
25+ raise e
26+ del e
2427
2528# Resolve availability of optional packages.
2629
You can’t perform that action at this time.
0 commit comments