def start(self):
if not self.auto_retry:<EOL><INDENT>self.curl()<EOL>return<EOL><DEDENT>while not self.is_finished:<EOL><INDENT>try:<EOL><INDENT>self.curl()<EOL><DEDENT>except pycurl.error as e:<EOL><INDENT>if e.args[<NUM_LIT:0>] == pycurl.E_PARTIAL_FILE:<EOL><INDENT>pass<EOL><DEDENT>elif e.args[<NUM_LIT:0>] == pycurl.E_HTTP_RANGE_ERROR:<EOL><INDENT>break<EOL><DEDENT>elif e.args[<NUM_LIT:0>] == pycurl.E_RECV_ERROR:<EOL><INDENT>if self._rst_retries < self.max_rst_retries:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>raise e<EOL><DEDENT>self._rst_retries += <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>raise e<EOL><DEDENT><DEDENT><DEDENT>self._move_path()<EOL>self._done()<EOL>
Start downloading, handling auto retry, download resume and path
moving