diff --git a/tracker/dmlc_tracker/local.py b/tracker/dmlc_tracker/local.py index f8b1ae5d01..fcf7551f3b 100644 --- a/tracker/dmlc_tracker/local.py +++ b/tracker/dmlc_tracker/local.py @@ -22,9 +22,7 @@ def exec_cmd(cmd, role, taskid, pass_env): env['DMLC_ROLE'] = role env['DMLC_JOB_CLUSTER'] = 'local' - num_retry = 0 - if 'DMLC_NUM_ATTEMPT' in env: - num_retry = env['DMLC_NUM_ATTEMPT'] + num_retry = env.get('DMLC_NUM_ATTEMPT', 0) while True: if os.name == 'nt':