I typically prefer to keep the main path not for error cases, so instead

if not lines:
  return (a, b)

# main path goes here