human
Solve the following python programming problem given the following code:
def lock(remote = None) : 
    '
    Place an update.lk

    ``remote`` can either be a dictionary containing repo configuration
    information, or a pattern. If the latter, then remotes for which the URL
    matches the pattern will be locked.
    ' 
    def _do_lock(repo) : 
        success = [] 
        failed = [] 
        if (not os.path.exists (repo ['lockfile'])) : 
            try : 
                with salt.utils.fopen (repo ['lockfile'], 'w+') as fp_ : 
                    fp_.write ('') 
except (IOError, OSError) as exc : 
                msg = 'Unable to set update lock for {0} ({1}): {2} '.format (repo ['url'], repo ['lockfile'], exc) 
                log.debug (msg) 
                failed.append (msg) 
else : 
                msg = 'Set lock for {0}'.format (repo ['url']) 
                log.debug (msg) 
                success.append (msg) 
return (success, failed) 
if isinstance (remote, dict) : 
        return _do_lock (remote) 
locked = [] 
    errors = [] 
    for repo in init () : 
        if remote : 
            try : 
                if (not fnmatch.fnmatch (success ['url'], remote)) : 
                    continue 
except TypeError : 
                if (not fnmatch.fnmatch (repo ['url'], six.text_type (remote))) : 
                    continue 
(success, failed) = _do_lock (repo) 
        locked.extend (success) 
        errors.extend (failed) 
return (locked, errors) 

    
    

    Fix the buggy line: if (not fnmatch.fnmatch (success ['url'], remote)) :
assistant
#Here is Python program to fix the buggy line: if (not fnmatch.

if (not fnmatch.fnmatch (repo ['url'], remote)) :