「pygletでフルスクリーン表示等をするサンプル」の編集履歴(バックアップ)一覧に戻る
--- lib.py.old Mon Jun 18 17:38:02 2012
+++ lib.py.new Mon May 13 08:34:50 2013
@@ -115,9 +115,12 @@
lib = _TraceLibrary(lib)
return lib
except OSError, o:
- if ((self.linux_not_found_error not in o.message) and
- (self.darwin_not_found_error not in o.message)):
- print "Unexpected error loading library %s: %s" % (name, o.message)
+ if ((self.platform == "win32" and o.winerror != 126) or
+ (self.platform.startswith("linux") and
+ self.linux_not_found_error not in o.args[0]) or
+ (self.platform == "darwin" and
+ self.darwin_not_found_error not in o.args[0])):
+ print "Unexpected error loading library %s: %s" % (name, str(o))
raise
path = self.find_library(name)
if path: