[python-arrayfire] 46/250: Suppress missing dll warnings on windows
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Mar 28 22:59:29 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/master
in repository python-arrayfire.
commit 3b8b928c62f91b4a7db7b32402f13f78b8ed985d
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date: Mon Jul 20 13:34:09 2015 -0400
Suppress missing dll warnings on windows
---
arrayfire/library.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arrayfire/library.py b/arrayfire/library.py
index 44ce021..811e268 100644
--- a/arrayfire/library.py
+++ b/arrayfire/library.py
@@ -22,6 +22,13 @@ def load_backend(name):
elif platform_name == "Windows" or platform_name[:3] == "CYG":
libname += '.dll'
libname = libname[3:] # remove 'lib'
+ if platform_name == "Windows":
+ '''
+ Supressing crashes caused by missing dlls
+ http://stackoverflow.com/questions/8347266/missing-dll-print-message-instead-of-launching-a-popup
+ https://msdn.microsoft.com/en-us/library/windows/desktop/ms680621.aspx
+ '''
+ ct.windll.kernel32.SetErrorMode(0x0001 | 0x0002);
else:
raise OSError(platform_name + ' not supported')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-arrayfire.git
More information about the debian-science-commits
mailing list