Skip to content

Commit

Permalink
More robust exit based on 2016 glibc error.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndresMWeber committed Feb 1, 2018
1 parent c488621 commit 3bb459f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions anvil/plugins/maya/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,21 @@ def exit_maya():
import maya.standalone as ms
import sys
sys.stdout.write('Anvil is exiting Standalone Maya.')

mc.file(new=True, force=True)
sys.stdout.write('.')
sys.stdout.flush()
ms.uninitialize()
sys.stdout.write('.')
sys.stdout.flush()

from pymel import versions
if not str(versions.current()).startswith('2016'):
ms.uninitialize()
sys.stdout.write('.')
sys.stdout.flush()
except:
pass

finally:
sys.stdout.write('Success...exiting.')
sys.stdout.write('Success...exiting.\n')
sys.stdout.flush()
import os
os._exit(0)
os._exit(0)

0 comments on commit 3bb459f

Please sign in to comment.