Skip to content

Commit 5f5b528

Browse files
committed
fix RMC import error
1 parent 28f6913 commit 5f5b528

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

GSASII/imports/G2phase_rmc6f.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
import random as ran
99
from .. import GSASIIobj as G2obj
1010
from .. import GSASIIlattice as G2lat
11-
11+
try:
12+
from .. import GSASIIctrlGUI as G2G
13+
except ImportError:
14+
G2G = None
15+
1216
class PhaseReaderClass(G2obj.ImportPhase):
1317
'Opens a .rmc6f file and pulls out the phase'
1418
def __init__(self):
@@ -43,8 +47,8 @@ def Readrmc6fPhase(self,filename,parent=None):
4347
fp = open(filename, 'r')
4448
Phase = {}
4549
Title = os.path.split(filename)
46-
import GSASIIctrlGUI as G2G
47-
G2G.SaveGPXdirectory(Title[0])
50+
if G2G is not None:
51+
G2G.SaveGPXdirectory(Title[0])
4852
Title = os.path.splitext(Title[1])[0]
4953
Atoms = []
5054
S = fp.readline()

0 commit comments

Comments
 (0)