Skip to content

Commit

Permalink
htcondor: use str.isdigit() instead of extra function
Browse files Browse the repository at this point in the history
  • Loading branch information
alintulu committed Oct 9, 2020
1 parent ac37cd5 commit c0dc113
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions reana_job_controller/htcondorcern_job_manager.py
Expand Up @@ -147,7 +147,7 @@ def execute(self):
"nextweek",
):
job_ad["JobFlavour"] = self.htcondor_max_runtime
elif HTCondorJobManagerCERN._is_int(self.htcondor_max_runtime):
elif str.isdigit(self.htcondor_max_runtime):
job_ad["MaxRunTime"] = int(self.htcondor_max_runtime)
else:
job_ad["MaxRunTime"] = 3600
Expand Down Expand Up @@ -332,9 +332,3 @@ def find_job_in_history(backend_job_id):
# Did not match to any job in the history yet
return None

def _is_int(x):
try:
int(x)
return True
except (TypeError, ValueError):
return False

0 comments on commit c0dc113

Please sign in to comment.