Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 8th, 2011  |  syntax: Python  |  size: 0.32 KB  |  hits: 167  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.     scheme = parsed.scheme
  2.     if scheme == 'http': scheme = 'ws'
  3.     is_secure = False
  4.     if scheme == "ws":
  5.         if not port:
  6.             port = 80
  7.     elif scheme == "wss":
  8.         is_secure = True
  9.         if not port:
  10.             port  = 443
  11.     else:
  12.         raise ValueError("scheme %s is invalid" % scheme)