[Python-checkins] CVS: python/dist/src/Mac/Modules/drag _Dragmodule.c,1.6,1.6.4.1 dragsupport.py,1.8,1.8.14.1

Jack Jansen jackjansen@users.sourceforge.net
Wed, 27 Feb 2002 15:12:33 -0800


Update of /cvsroot/python/python/dist/src/Mac/Modules/drag
In directory usw-pr-cvs1:/tmp/cvs-serv1566/drag

Modified Files:
      Tag: release22-maint
	_Dragmodule.c dragsupport.py 
Log Message:
Backport of 1.7 (of _Dragmodule.c):
Callback error handling improvements:
- print traceback
- don't use fprintf()
- clear exception (implied by PyErr_Print())



Index: _Dragmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/drag/_Dragmodule.c,v
retrieving revision 1.6
retrieving revision 1.6.4.1
diff -C2 -d -r1.6 -r1.6.4.1
*** _Dragmodule.c	18 Dec 2001 15:37:53 -0000	1.6
--- _Dragmodule.c	27 Feb 2002 23:12:31 -0000	1.6.4.1
***************
*** 899,903 ****
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		fprintf(stderr, "Drag: Exception in TrackingHandler\n");
  		return -1;
  	}
--- 899,904 ----
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		PySys_WriteStderr("Drag: Exception in TrackingHandler\n");
! 		PyErr_Print();
  		return -1;
  	}
***************
*** 924,928 ****
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		fprintf(stderr, "Drag: Exception in ReceiveHandler\n");
  		return -1;
  	}
--- 925,930 ----
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		PySys_WriteStderr("Drag: Exception in ReceiveHandler\n");
! 		PyErr_Print();
  		return -1;
  	}
***************
*** 952,956 ****
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		fprintf(stderr, "Drag: Exception in SendDataHandler\n");
  		return -1;
  	}
--- 954,959 ----
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		PySys_WriteStderr("Drag: Exception in SendDataHandler\n");
! 		PyErr_Print();
  		return -1;
  	}

Index: dragsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/drag/dragsupport.py,v
retrieving revision 1.8
retrieving revision 1.8.14.1
diff -C2 -d -r1.8 -r1.8.14.1
*** dragsupport.py	5 Sep 2001 10:31:32 -0000	1.8
--- dragsupport.py	27 Feb 2002 23:12:31 -0000	1.8.14.1
***************
*** 83,87 ****
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		fprintf(stderr, "Drag: Exception in TrackingHandler\\n");
  		return -1;
  	}
--- 83,88 ----
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		PySys_WriteStderr("Drag: Exception in TrackingHandler\\n");
! 		PyErr_Print();
  		return -1;
  	}
***************
*** 108,112 ****
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		fprintf(stderr, "Drag: Exception in ReceiveHandler\\n");
  		return -1;
  	}
--- 109,114 ----
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		PySys_WriteStderr("Drag: Exception in ReceiveHandler\\n");
! 		PyErr_Print();
  		return -1;
  	}
***************
*** 136,140 ****
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		fprintf(stderr, "Drag: Exception in SendDataHandler\\n");
  		return -1;
  	}
--- 138,143 ----
  	Py_DECREF(args);
  	if ( rv == NULL ) {
! 		PySys_WriteStderr("Drag: Exception in SendDataHandler\\n");
! 		PyErr_Print();
  		return -1;
  	}