File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -56,14 +56,17 @@ def parse_job_key(job_key):
56
56
elif isinstance (job_key , six .string_types ):
57
57
parts = job_key .split ('/' )
58
58
else :
59
- raise ValueError ("Job key should be a string or a tuple" )
59
+ raise ValueError ("Job key should be a string or a tuple, got {}: {}"
60
+ .format (type (job_key ), repr (job_key )))
60
61
if len (parts ) != 3 :
61
62
raise ValueError (
62
- "Job key should consist of project_id/spider_id/job_id" )
63
+ "Job key should consist of project_id/spider_id/job_id, got {}"
64
+ .format (repr (job_key )))
63
65
try :
64
66
list (map (int , parts ))
65
67
except ValueError :
66
- raise ValueError ("Job key parts should be integers" )
68
+ raise ValueError ("Job key parts should be integers, got {}"
69
+ .format (repr (job_key )))
67
70
return JobKey (* map (str , parts ))
68
71
69
72
You can’t perform that action at this time.
0 commit comments