# HG changeset patch # User drewp # Date 2003-06-13 06:13:31 # Node ID f0e27aa8f0f5bc10c10223c53afbad40de058f50 # Parent d74caafb8ee5d2859e305cc5a6f6f392b1231330 attempt to make a better exception with getparport(). didn't help, afaict diff --git a/light8/parport.c b/light8/parport.c --- a/light8/parport.c +++ b/light8/parport.c @@ -6,13 +6,15 @@ #include #include -void getparport() { +int getparport() { if( ioperm(888,3,1) ) { printf("Couldn't get parallel port at 888-890\n"); // the following doesn't have any effect! PyErr_SetString(PyExc_IOError,"Couldn't get parallel port at 888-890"); + return 0; } + return 1; } void outdata(unsigned char val) {