rosjat/python-scsi — pull request #45 by c-r-h (2014-12-19 22:30:28+00:00)
Title: Added <readwrite> parameter to class SCSIDevice().

[Please ignore the fact that it took me four tries to correctly commit this simple change to GitHub. :unamused: ]

These changes just add the 'readwrite' parameter. The bool() builtin function evaluates whatever it is we've been given (I assume some user or other may try to pass in None, or a string) to ensure that it's a proper boolean value, which the C code should parse as an int. I put the call to bool() on its own line so that it doesn't show up when an exception is called from with sgio.open().

Chris -)-----