py3: don't use deprecated except syntax