Update of /cvsroot/freevo/freevo/src/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv32465

Modified Files:
        rom_drives.py 
Log Message:
handling if CDROM.py is missing

Index: rom_drives.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/plugins/rom_drives.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** rom_drives.py       23 Sep 2003 13:45:20 -0000      1.34
--- rom_drives.py       25 Sep 2003 09:48:42 -0000      1.35
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.35  2003/09/25 09:48:42  dischi
+ # handling if CDROM.py is missing
+ #
  # Revision 1.34  2003/09/23 13:45:20  outlyer
  # Making more informational text quiet by default.
***************
*** 95,100 ****
  import string
  import copy
! if os.uname()[0] != 'FreeBSD':
      from CDROM import *
  import traceback
  
--- 98,122 ----
  import string
  import copy
! try:
      from CDROM import *
+ except ImportError:
+     if os.uname()[0] == 'FreeBSD':
+         # FreeBSD ioctls - there is no CDROM.py...
+         CDIOCEJECT = 0x20006318
+         CDIOCCLOSE = 0x2000631c
+         CDIOREADTOCENTRYS = 0xc0086305
+         CD_LBA_FORMAT = 1
+         CD_MSF_FORMAT = 2
+         CDS_NO_DISC = 1
+         CDS_DISC_OK = 4
+     else:
+         # strange ioctrls missing
+         CDROMEJECT = 0x5309
+         CDROMCLOSETRAY = 0x5319
+         CDROM_DRIVE_STATUS = 0x5326
+         CDROM_SELECT_SPEED = 0x5322
+         CDS_NO_DISC = 1
+         CDS_DISC_OK = 4
+         
  import traceback
  
***************
*** 119,131 ****
  from struct import *
  import array
- if os.uname()[0] == 'FreeBSD':
-     # FreeBSD ioctls - there is no CDROM.py...
-     CDIOCEJECT = 0x20006318
-     CDIOCCLOSE = 0x2000631c
-     CDIOREADTOCENTRYS = 0xc0086305
-     CD_LBA_FORMAT = 1
-     CD_MSF_FORMAT = 2
-     CDS_NO_DISC = 1
-     CDS_DISC_OK = 4
  
  # Identify_Thread
--- 141,144 ----




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to