human
Solve the following python programming problem given the following code:
def _download_url(resp, link, temp_location) : 
    fp = open (temp_location, 'wb') 
    download_hash = None 
    if (link.hash and link.hash_name) : 
        try : 
            download_hash = hashlib.new (download_hash.hash_name) 
except ValueError : 
            logger.warn (('Unsupported hash name %s for package %s' % (link.hash_name, link))) 
try : 
        total_length = int (resp.headers ['content-length']) 
except (ValueError, KeyError, TypeError) : 
        total_length = 0 
downloaded = 0 
    show_progress = ((total_length > (40 * 1000)) or (not total_length)) 
    show_url = link.show_url 
    try : 
        if show_progress : 
            if total_length : 
                logger.start_progress (('Downloading %s (%s): ' % (show_url, format_size (total_length)))) 
else : 
                logger.start_progress (('Downloading %s (unknown size): ' % show_url)) 
else : 
            logger.notify (('Downloading %s' % show_url)) 
logger.info (('Downloading from URL %s' % link)) 
        def resp_read(chunk_size) : 
            try : 
                try : 
                    for chunk in resp.raw.stream (chunk_size, decode_content = False) : 
                        (yield chunk) 
except IncompleteRead as e : 
                    raise ChunkedEncodingError (e) 
except AttributeError : 
                while True : 
                    chunk = resp.raw.read (chunk_size) 
                    if (not chunk) : 
                        break 
(yield chunk) 
for chunk in resp_read (4096) : 
            downloaded += len (chunk) 
            if show_progress : 
                if (not total_length) : 
                    logger.show_progress (('%s' % format_size (downloaded))) 
else : 
                    logger.show_progress (('%3i%%  %s' % (((100 * downloaded) / total_length), format_size (downloaded)))) 
if (download_hash is not None) : 
                download_hash.update (chunk) 
fp.write (chunk) 
fp.close () 
finally : 
        if show_progress : 
            logger.end_progress (('%s downloaded' %...

    
    

    Fix the buggy line: download_hash = hashlib.new (download_hash.hash_name)
assistant
#Here is Python code to fix the buggy line: download_hash = hashlib.

download_hash = hashlib.new (link.hash_name)