Commits

Mark Hammond committed 0ff0ae9

get all tests/samples working in py3k

Comments (0)

Files changed (2)

isapi/samples/advanced.py

                 win32file.FindNextChangeNotification(self.handle)
             except win32event.error, details:
                 # handle closed - thread should terminate.
-                if details[0] != winerror.ERROR_INVALID_HANDLE:
+                if details.winerror != winerror.ERROR_INVALID_HANDLE:
                     raise
                 break
             this_time = os.stat(self.filename)[stat.ST_MTIME]
             print "Doing reload"
             raise InternalReloadException
 
-        url = ecb.GetServerVariable("URL")
+        url = ecb.GetServerVariable("UNICODE_URL")
         if url.endswith("ReportUnhealthy"):
             ecb.ReportUnhealthy("I'm a little sick")
 

isapi/samples/test.py

                 win32file.FindNextChangeNotification(self.handle)
             except win32event.error, details:
                 # handle closed - thread should terminate.
-                if details[0] != winerror.ERROR_INVALID_HANDLE:
+                if details.winerror != winerror.ERROR_INVALID_HANDLE:
                     raise
                 break
             this_time = os.stat(self.filename)[stat.ST_MTIME]
             print "Doing reload"
             raise InternalReloadException
 
-        if ecb.GetServerVariable("URL").endswith("test.py"):
+        if ecb.GetServerVariable("UNICODE_URL").endswith("test.py"):
             file_flags = win32con.FILE_FLAG_SEQUENTIAL_SCAN  | win32con.FILE_FLAG_OVERLAPPED
             hfile = win32file.CreateFile(__file__, win32con.GENERIC_READ,
                                          0, None, win32con.OPEN_EXISTING,