Project

General

Profile

Bug #5813

regular expression in job.py too greedy

Added by Dennis Box over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
JobSub CherryPy Web App
Target version:
Start date:
04/02/2014
Due date:
% Done:

100%

Estimated time:
Spent time:
First Occurred:
Occurs In:
Stakeholders:
Duration:

Description

one of the tasks of job.py is to translate my_job.sh (originally file://my_job.sh at the client end) into /full/path/to/my_job.sh. It does this with the following code snippet:
command_tag = '
(.*)%s' % jobsub_command.filename
jobsub_args = re.sub(command_tag, command_file_path, jobsub_args)
logger.log('jobsub_args (subbed): %s' % jobsub_args)

The problem is, substitution occurs on the first instance of '@' in jobsub_args. If for instance, if an email address is passed in to jobsub_args the substitution is all wrong and submission breaks.

Change this RE to catch the last instance of '@'.

History

#1 Updated by Parag Mhashilkar over 5 years ago

  • Target version changed from v0.3 to v0.2.1

#2 Updated by Dennis Box over 5 years ago

  • Status changed from New to Closed

-l "notify_user=" now gets sent correctly into classad after regular expression change.

#3 Updated by Parag Mhashilkar over 5 years ago

  • % Done changed from 0 to 100


Also available in: Atom PDF