def _should_create_database(connection):
 if (not _can_support_reuse_db(connection)):
  return True
 try:
  connection.cursor()
 except Exception:
  return True
 return (not _reusing_db())

def _should_create_database ( connection ) : if ( not _can_support_reuse_db ( connection ) ) : return True try : connection . cursor ( ) except Exception : return True return ( not _reusing_db ( ) )
return whether we should recreate the given db .