crs4 / pydoop

A Python MapReduce and HDFS API for Hadoop
Apache License 2.0
236 stars 59 forks source link

Pydoop CLI swallows all AttributeError exceptions #342

Closed simleo closed 5 years ago

simleo commented 5 years ago

The logic introduced in #285 incorrectly swallows any AttributeError occurring in the code run by args.func. Replace with:

try:
    func = args.func
except AttributeError:
    parser.error("too few arguments")
try:
    func(args, unknown)
except RuntimeError as e:
    ...