File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 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):
5656 elif isinstance (job_key , six .string_types ):
5757 parts = job_key .split ('/' )
5858 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 )))
6061 if len (parts ) != 3 :
6162 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 )))
6365 try :
6466 list (map (int , parts ))
6567 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 )))
6770 return JobKey (* map (str , parts ))
6871
6972
You can’t perform that action at this time.
0 commit comments