mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
WPD: Dumping filesystem metadata works
This commit is contained in:
parent
585bea2c24
commit
b601e7bc63
@ -209,9 +209,7 @@ static PyObject* bulk_get_filesystem(IPortableDevice *device, IPortableDevicePro
|
||||
|
||||
callback->thread_state = PyEval_SaveThread();
|
||||
while (TRUE) {
|
||||
Py_BEGIN_ALLOW_THREADS;
|
||||
wait_result = MsgWaitForMultipleObjects(1, &(callback->complete), FALSE, 60000, QS_ALLEVENTS);
|
||||
Py_END_ALLOW_THREADS;
|
||||
if (wait_result == WAIT_OBJECT_0) {
|
||||
break; // Event was signalled, bulk operation complete
|
||||
} else if (wait_result == WAIT_OBJECT_0 + 1) { // Messages need to be dispatched
|
||||
|
@ -70,6 +70,7 @@ def main():
|
||||
print ('Connected to:', dev.get_gui_name())
|
||||
print ('Total space', dev.total_space())
|
||||
print ('Free space', dev.free_space())
|
||||
pprint.pprint(dev.dev.get_filesystem(dev._main_id))
|
||||
finally:
|
||||
dev.shutdown()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user