Skip to content

Commit

Permalink
Excessive error handling for Maya exit function.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndresMWeber committed Feb 1, 2018
1 parent 7d2dc4f commit 85df957
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions anvil/plugins/maya/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,15 @@ def exit_maya():
try:
import maya.standalone as ms
import os
print('Anvil is exiting Standalone Maya.')
import sys
sys.stdout.write('Anvil is exiting Standalone Maya.')
sys.stdout.write('.')
mc.file(new=True, force=True)
sys.stdout.write('.')
ms.uninitialize()
sys.stdout.write('.')
os._exit(0)
except TypeError:
sys.stdout.write('Success')

except:
pass

0 comments on commit 85df957

Please sign in to comment.