Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Fix exeption handling of unpacking k/v pair.
Browse files Browse the repository at this point in the history
  • Loading branch information
youngsofun committed Jan 23, 2019
1 parent 6dfe760 commit 17e83f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dpark/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,9 @@ def _run(self, task_id):
try:
try:
k, v = item
except:
raise DparkUserFatalError("item of {} should be (k, v) pair, got: {}".format(rdd.scope.key, item))
except (TypeError, ValueError) as e:
msg = "item of {} should be (k, v) pair, got: {}, exception: {}".format(rdd.scope.key, item, e)
raise DparkUserFatalError(msg)

bucket = buckets[get_partition(k)]
r = bucket.get(k, None)
Expand Down

0 comments on commit 17e83f6

Please sign in to comment.