'Returns True if the database has progress information.
Note there are two basic cases for progress information:
1) All saved records indicate a successful upload. In this case, we
need to skip everything transmitted so far and then send the rest.
2) Some records for incomplete transfer are present. These need to be
sent again, and then we resume sending after all the successful
data.
Returns:
True: if the database has progress information.
Raises:
ResumeError: if there is an error retrieving rows from the database.'

def UseProgressData(self):

    assert _RunningInThread(self.primary_thread)
    cursor = self.primary_conn.cursor()
    cursor.execute('select    count(*)    from    progress')
    row = cursor.fetchone()
    if (row is None):
        raise ResumeError('Cannot    retrieve    progress    information    from    database.')
    return (row[0] != 0)
