Update of /cvsroot/freevo/freevo/lib/pyepg
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1883
Modified Files:
db_sqlite.py
Log Message:
Add a quick check for zero size database - more to be done.
Index: db_sqlite.py
===================================================================
RCS file: /cvsroot/freevo/freevo/lib/pyepg/db_sqlite.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** db_sqlite.py 24 Mar 2005 17:52:26 -0000 1.2
--- db_sqlite.py 7 Apr 2005 11:52:24 -0000 1.3
***************
*** 53,57 ****
--- 53,61 ----
"""
def __init__(self, dbpath):
+ if os.path.getsize(dbpath) == 0:
+ log.error('EPG database is zero size (invalid), removing it')
+ os.system('rm %s' % dbath)
if not os.path.isfile(dbpath):
+ # TODO: try to find sqlite in the path, error if not
log.warning('EPG database missing, creating it')
scheme = os.path.join(os.path.dirname(__file__), 'epg_schema.sql')
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog