[openlp-dev] MediaShout import bug
Ken Roberts
alisonken1 at gmail.com
Sat Jun 11 23:22:33 EDT 2016
There's a possibility of checking if table exists, I just have a
problem atm with the unixODBC, PyODBC driver interface.
One thing the mediashout import _assumes_ is that it's using an
MSAccess interface - which unixODBC may have a different driver name
than the default MSAccess driver name.
On Sat, Jun 11, 2016 at 1:00 PM, Raoul Snyman <raoul at snyman.info> wrote:
>> OK - a try:except block around the themes should do it. The problem
>> will be writing a test case for that issue.
>>
>> Should I create a test database without the Themes table and hope that
>> mdbtools creates a decent dbfile?
>
>
> I ask this without having looked at the code yet - is there not some way to
> check if a table exists? Surely that would be a better way to do things than
> to just blindly catch the exception?
>
> Writing a test should not be difficult. Just use a mock object to throw an
> exception or return False when necessary.
>
>
>
> --
> Raoul Snyman
> e: raoul at snyman.info
> _______________________________________________
> openlp-dev mailing list
> openlp-dev at openlp.io
> https://lists.openlp.io/mailman/listinfo/openlp-dev
--
- Ken
Registered Linux user 296561
Slackin' since 1993
Slackware Linux (http://www.slackware.com)
More information about the openlp-dev
mailing list