فهرست منبع

Fix websockify with python2.4

https://github.com/kanaka/noVNC/issues/72

Pull from websockify 2e00f9643.
Joel Martin 14 سال پیش
والد
کامیت
46c621175c
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      utils/websockify

+ 2 - 2
utils/websockify

@@ -255,7 +255,7 @@ if __name__ == '__main__':
 
     # Parse host:port and convert ports to numbers
     if args[0].count(':') > 0:
-        opts.listen_host, sep, opts.listen_port = args[0].rpartition(':')
+        opts.listen_host, opts.listen_port = args[0].rsplit(':', 1)
     else:
         opts.listen_host, opts.listen_port = '', args[0]
 
@@ -267,7 +267,7 @@ if __name__ == '__main__':
         opts.target_port = None
     else:
         if args[1].count(':') > 0:
-            opts.target_host, sep, opts.target_port = args[1].rpartition(':')
+            opts.target_host, opts.target_port = args[1].rsplit(':', 1)
         else:
             parser.error("Error parsing target")
         try:    opts.target_port = int(opts.target_port)