Ticket #2779: 2779_2_banner.patch

File 2779_2_banner.patch, 1.5 KB (added by wjp, 12 years ago)
  • sagenb/notebook/run_notebook.py

    # HG changeset patch
    # User Willem Jan Palenstijn <wjp@usecode.org>
    # Date 1263756681 28800
    # Node ID 631952a5464de65d8dccc2a779ee89c747d33cd5
    # Parent  99264e0eeccef1bcf101332726d06c7f6bf36083
    #2779 part 2: only display notebook banner if really starting notebook
    
    diff -r 99264e0eecce -r 631952a5464d sagenb/notebook/run_notebook.py
    a b  
    284284
    285285        config.close()                     
    286286
    287         ## Start up twisted
    288         if not quiet:
    289             print_open_msg('localhost' if not interface else interface, port, secure=secure)
    290         if secure and not quiet:
    291             print "There is an admin account.  If you do not remember the password,"
    292             print "quit the notebook and type notebook(reset=True)."
    293 
    294287        pidfile = os.path.join(directory, 'twistd.pid')
    295288        cmd = 'twistd --pidfile="%s" -ny "%s"' % (pidfile, os.path.join(directory, 'twistedconf.tac'))
    296289
     
    307300
    308301Please either stop the old server or run the new server in a different directory.
    309302""" % pid)
     303        ## Start up twisted
     304        if not quiet:
     305            print_open_msg('localhost' if not interface else interface, port, secure=secure)
     306        if secure and not quiet:
     307            print "There is an admin account.  If you do not remember the password,"
     308            print "quit the notebook and type notebook(reset=True)."
     309
    310310        if fork:
    311311            import pexpect
    312312            return pexpect.spawn(cmd)