python: closed_way problem