def update_url(url, debug):
 if (not url):
  return url
 original_url = url
 url = url.replace('://raw.github.com/', '://raw.githubusercontent.com/')
 url = url.replace('://nodeload.github.com/', '://codeload.github.com/')
 url = re.sub('^(https://codeload.github.com/[^/]+/[^/]+/)zipball(/.*)$', '\\1zip\\2', url)
 if ((url == 'https://sublime.wbond.net/repositories.json') or (url == 'https://sublime.wbond.net/channel.json')):
  url = 'https://packagecontrol.io/channel_v3.json'
 if (debug and (url != original_url)):
  console_write(u'\n            Fixed URL from %s to %s\n            ', (original_url, url))
 return url

def update_url ( url , debug ) : if ( not url ) : return url original_url = url url = url . replace ( '://raw.github.com/' , '://raw.githubusercontent.com/' ) url = url . replace ( '://nodeload.github.com/' , '://codeload.github.com/' ) url = re . sub ( '^(https://codeload.github.com/[^/]+/[^/]+/)zipball(/.*)$' , '\\1zip\\2' , url ) if ( ( url == 'https://sublime.wbond.net/repositories.json' ) or ( url == 'https://sublime.wbond.net/channel.json' ) ) : url = 'https://packagecontrol.io/channel_v3.json' if ( debug and ( url != original_url ) ) : console_write ( u'\n            Fixed URL from %s to %s\n            ' , ( original_url , url ) ) return url
takes an old .