]> jfr.im git - yt-dlp.git/blobdiff - devscripts/buildserver.py
Minor fixes
[yt-dlp.git] / devscripts / buildserver.py
index 2bd12da5018cbd5ab164a51c94b394de5d8e452c..62dbd2cb17590bbd2e05fc37a1d7ba6e24af5c46 100644 (file)
@@ -12,7 +12,8 @@
 import os.path
 
 sys.path.insert(0, os.path.dirname(os.path.dirname((os.path.abspath(__file__)))))
-from youtube_dl.compat import (
+from youtube_dlc.compat import (
+    compat_input,
     compat_http_server,
     compat_str,
     compat_urlparse,
 except ImportError:  # Python 2
     import SocketServer as compat_socketserver
 
-try:
-    compat_input = raw_input
-except NameError:  # Python 3
-    compat_input = input
-
 
 class BuildHTTPServer(compat_socketserver.ThreadingMixIn, compat_http_server.HTTPServer):
     allow_reuse_address = True
@@ -216,7 +212,7 @@ def main(args=None):
                         action='store_const', dest='action', const='service',
                         help='Run as a Windows service')
     parser.add_argument('-b', '--bind', metavar='<host:port>',
-                        action='store', default='localhost:8142',
+                        action='store', default='0.0.0.0:8142',
                         help='Bind to host:port (default %default)')
     options = parser.parse_args(args=args)
 
@@ -326,10 +322,10 @@ def build(self):
 
 
 class YoutubeDLBuilder(object):
-    authorizedUsers = ['fraca7', 'phihag', 'rg3', 'FiloSottile']
+    authorizedUsers = ['fraca7', 'phihag', 'rg3', 'FiloSottile', 'ytdl-org']
 
     def __init__(self, **kwargs):
-        if self.repoName != 'youtube-dl':
+        if self.repoName != 'youtube-dlc':
             raise BuildError('Invalid repository "%s"' % self.repoName)
         if self.user not in self.authorizedUsers:
             raise HTTPError('Unauthorized user "%s"' % self.user, 401)
@@ -428,8 +424,6 @@ def do_GET(self):
                     self.send_header('Content-Length', len(msg))
                     self.end_headers()
                     self.wfile.write(msg)
-                except HTTPError as e:
-                    self.send_response(e.code, str(e))
             else:
                 self.send_response(500, 'Unknown build method "%s"' % action)
         else: