Skip to content

Commit 28e3faf

Browse files
committed
look for other uses with subprocess.Popen w/o a .wait() call
1 parent a068a36 commit 28e3faf

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

GSASII/GSASIIctrlGUI.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9191,6 +9191,12 @@ def gitFetch(G2frame):
91919191
wx.GetApp().Yield()
91929192
if not ok:
91939193
return
9194+
G2frame.UpdateTask.terminate()
9195+
try:
9196+
G2frame.UpdateTask.wait(1)
9197+
except TimeoutExpired:
9198+
pass
9199+
91949200
if GSASIIpath.GetConfigValue('debug'): print('background update complete')
91959201
# try update one more time just to make sure
91969202
GSASIIpath.gitGetUpdate('immediate')

GSASII/GSASIIpath.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,6 +1594,12 @@ def addCondaPkg():
15941594
stderr=subprocess.PIPE,
15951595
encoding='UTF-8')
15961596
out,err = p.communicate()
1597+
p.terminate()
1598+
try:
1599+
p.wait(1)
1600+
except TimeoutExpired:
1601+
pass
1602+
15971603
if out is not None and GetConfigValue('debug'): print('Output from adding conda:\n',out)
15981604
if err and err is not None:
15991605
print('Note error/warning from running conda:\n',err)

0 commit comments

Comments
 (0)