1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-08 12:01:56 +00:00
freebsd-ports/multimedia/mmpython/files/patch-disc__discinfo.py
Alexander Nedotsukov a2936e07c7 - Recovery from nasty update.
- Plug CDROM device file descriptor leak.
2008-04-06 10:18:01 +00:00

23 lines
961 B
Python

--- disc/discinfo.py.orig 2004-09-15 05:12:25.000000000 +0900
+++ disc/discinfo.py 2008-04-06 18:36:43.000000000 +0900
@@ -145,14 +145,11 @@
try:
fd = os.open(device, os.O_RDONLY | os.O_NONBLOCK)
if os.uname()[0] == 'FreeBSD':
- try:
- cd_toc_entry = array.array('c', '\000'*4096)
- (address, length) = cd_toc_entry.buffer_info()
- buf = pack('BBHP', CD_MSF_FORMAT, 0, length, address)
- s = ioctl(fd, CDIOREADTOCENTRYS, buf)
- s = CDS_DISC_OK
- except:
- s = CDS_NO_DISC
+ cd_toc_entry = array.array('c', '\000'*4096)
+ (address, length) = cd_toc_entry.buffer_info()
+ buf = pack('BBHP', CD_MSF_FORMAT, 0, length, address)
+ s = ioctl(fd, CDIOREADTOCENTRYS, buf)
+ s = CDS_DISC_OK
else:
s = ioctl(fd, CDROM_DRIVE_STATUS, CDSL_CURRENT)
except: