From 59ed06686a6594eaaad2a7ac66990bb37c6b9905 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 2 Jan 2007 04:41:46 +0000 Subject: [PATCH] Remove obsolete todos. Fix in code to read metadata from LRF files. The old code would fail on some LRF files in which the metadata block was zero-terminated --- libprs500/communicate.py | 7 ------- libprs500/gui/main.py | 1 - libprs500/lrf/meta.py | 7 +++++-- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/libprs500/communicate.py b/libprs500/communicate.py index c5e90106e3..ef399bfb58 100755 --- a/libprs500/communicate.py +++ b/libprs500/communicate.py @@ -190,8 +190,6 @@ class PRS500Device(Device): be sent to the device, unless end_session is set to C{False}. An L{usb.USBError} will cause the library to release control of the USB interface via a call to L{close}. - - @todo: Fix handling of timeout errors """ def run_session(*args, **kwargs): dev = args[0] @@ -262,7 +260,6 @@ class PRS500Device(Device): See the source code for the sequenceof initialization commands. @todo: Implement unlocking of the device - @todo: Check this on Mac OSX """ self.device = self.device_descriptor.get_device() if not self.device: @@ -391,7 +388,6 @@ class PRS500Device(Device): The data packet is returned as an object of type C{data_type}. @return: A list of packets read from the device. Each packet is of type data_type - @todo: Figure out how to make bulk reads work in OSX """ def bulk_read_packet(data_type=Answer, size=0x1000): data = data_type(self.handle.bulkRead(PRS500Device.PRS500_BULK_IN_EP, \ @@ -803,9 +799,6 @@ class PRS500Device(Device): where data is the image data in JPEG format as a string @param booklists: A tuple containing the result of calls to (L{books}(oncard=False), L{books}(oncard=True)). - @todo: Implement syncing the booklists to the device. - This would mean juggling with the nextId attribute in - media.xml and renumbering ids in cache.xml? """ infile.seek(0, 2) size = infile.tell() diff --git a/libprs500/gui/main.py b/libprs500/gui/main.py index 5bcf2908e7..770c43e3c7 100644 --- a/libprs500/gui/main.py +++ b/libprs500/gui/main.py @@ -483,7 +483,6 @@ class Main(QObject, Ui_MainWindow): def device_removed(self): - """ @todo: only reset stuff if library is not shown """ self.df.setText(self.df_template.arg("").arg("").arg("")) self.device_tree.hide_reader(True) self.device_tree.hide_card(True) diff --git a/libprs500/lrf/meta.py b/libprs500/lrf/meta.py index 13a69afce4..7c389ddab2 100644 --- a/libprs500/lrf/meta.py +++ b/libprs500/lrf/meta.py @@ -27,6 +27,7 @@ to get and set meta information. For example: import struct, array, zlib, StringIO import xml.dom.minidom as dom from xml.dom.ext import Print as Print + from libprs500.prstypes import field BYTE = "