##// END OF EJS Templates
Addressing various review comments.
Brian Granger -
Show More
@@ -15,6 +15,7 b' __docformat__ = "restructuredtext en"'
15 # Imports
15 # Imports
16 #---------------------------------------------------------------------------
16 #---------------------------------------------------------------------------
17
17
18
18 try:
19 try:
19 from IPython.kernel.core.interpreter import Interpreter
20 from IPython.kernel.core.interpreter import Interpreter
20 import IPython.kernel.engineservice as es
21 import IPython.kernel.engineservice as es
@@ -22,7 +23,7 b' try:'
22 from twisted.internet.defer import succeed
23 from twisted.internet.defer import succeed
23 from IPython.frontend.cocoa.cocoa_frontend import IPythonCocoaController
24 from IPython.frontend.cocoa.cocoa_frontend import IPythonCocoaController
24 from Foundation import NSMakeRect
25 from Foundation import NSMakeRect
25 from AppKit import NSTextView, NSScrollView
26 from AppKit import NSTextView, NSScrollView
26 except ImportError:
27 except ImportError:
27 import nose
28 import nose
28 raise nose.SkipTest("This test requires zope.interface, Twisted, Foolscap and PyObjC")
29 raise nose.SkipTest("This test requires zope.interface, Twisted, Foolscap and PyObjC")
@@ -268,6 +268,8 b' def _formatTracebackLines(lnum, index, lines, Colors, lvals=None,scheme=None):'
268 # This lets us get fully syntax-highlighted tracebacks.
268 # This lets us get fully syntax-highlighted tracebacks.
269 if scheme is None:
269 if scheme is None:
270 try:
270 try:
271 # Again, reference to a global __IPYTHON__ that doesn't exist.
272 # XXX
271 scheme = __IPYTHON__.rc.colors
273 scheme = __IPYTHON__.rc.colors
272 except:
274 except:
273 scheme = DEFAULT_SCHEME
275 scheme = DEFAULT_SCHEME
@@ -489,7 +491,7 b' class ListTB(TBTools):'
489
491
490 # This is being commented out for now as the __IPYTHON__ variable
492 # This is being commented out for now as the __IPYTHON__ variable
491 # referenced here is not resolved and causes massive test failures
493 # referenced here is not resolved and causes massive test failures
492 # and errors. B. Granger, 04/2009.
494 # and errors. B. Granger, 04/2009. XXX
493 # See https://bugs.launchpad.net/bugs/362137
495 # See https://bugs.launchpad.net/bugs/362137
494 # # vds:>>
496 # # vds:>>
495 # if have_filedata:
497 # if have_filedata:
@@ -810,7 +812,7 b' class VerboseTB(TBTools):'
810
812
811 # This is being commented out for now as the __IPYTHON__ variable
813 # This is being commented out for now as the __IPYTHON__ variable
812 # referenced here is not resolved and causes massive test failures
814 # referenced here is not resolved and causes massive test failures
813 # and errors. B. Granger, 04/2009.
815 # and errors. B. Granger, 04/2009. XXX
814 # See https://bugs.launchpad.net/bugs/362137
816 # See https://bugs.launchpad.net/bugs/362137
815 # # vds: >>
817 # # vds: >>
816 # if records:
818 # if records:
@@ -29,8 +29,12 b' from twisted.python import failure, log'
29
29
30 from IPython.external import argparse
30 from IPython.external import argparse
31 from IPython.external import Itpl
31 from IPython.external import Itpl
32 from IPython.genutils import get_ipython_dir, get_log_dir, get_security_dir
32 from IPython.genutils import (
33 from IPython.genutils import num_cpus
33 get_ipython_dir,
34 get_log_dir,
35 get_security_dir,
36 num_cpus
37 )
34 from IPython.kernel.fcutil import have_crypto
38 from IPython.kernel.fcutil import have_crypto
35
39
36 # Create various ipython directories if they don't exist.
40 # Create various ipython directories if they don't exist.
@@ -485,6 +489,7 b' class SSHEngineSet(object):'
485
489
486
490
487 def check_security(args, cont_args):
491 def check_security(args, cont_args):
492 """Check to see if we should run with SSL support."""
488 if (not args.x or not args.y) and not have_crypto:
493 if (not args.x or not args.y) and not have_crypto:
489 log.err("""
494 log.err("""
490 OpenSSL/pyOpenSSL is not available, so we can't run in secure mode.
495 OpenSSL/pyOpenSSL is not available, so we can't run in secure mode.
@@ -499,6 +504,7 b' Try running ipcluster with the -xy flags: ipcluster local -xy -n 4""")'
499
504
500
505
501 def check_reuse(args, cont_args):
506 def check_reuse(args, cont_args):
507 """Check to see if we should try to resuse FURL files."""
502 if args.r:
508 if args.r:
503 cont_args.append('-r')
509 cont_args.append('-r')
504 if args.client_port == 0 or args.engine_port == 0:
510 if args.client_port == 0 or args.engine_port == 0:
@@ -513,11 +519,13 b' the --client-port and --engine-port options.""")'
513
519
514
520
515 def _err_and_stop(f):
521 def _err_and_stop(f):
522 """Errback to log a failure and halt the reactor on a fatal error."""
516 log.err(f)
523 log.err(f)
517 reactor.stop()
524 reactor.stop()
518
525
519
526
520 def _delay_start(cont_pid, start_engines, furl_file, reuse):
527 def _delay_start(cont_pid, start_engines, furl_file, reuse):
528 """Wait for controller to create FURL files and the start the engines."""
521 if not reuse:
529 if not reuse:
522 if os.path.isfile(furl_file):
530 if os.path.isfile(furl_file):
523 os.unlink(furl_file)
531 os.unlink(furl_file)
@@ -21,9 +21,10 b' __docformat__ = "restructuredtext en"'
21 import sys
21 import sys
22 sys.path.insert(0, '')
22 sys.path.insert(0, '')
23
23
24 import sys, time, os
25 import tempfile
26 from optparse import OptionParser
24 from optparse import OptionParser
25 import os
26 import time
27 import tempfile
27
28
28 from twisted.application import internet, service
29 from twisted.application import internet, service
29 from twisted.internet import reactor, error, defer
30 from twisted.internet import reactor, error, defer
@@ -21,8 +21,8 b' __docformat__ = "restructuredtext en"'
21 import sys
21 import sys
22 sys.path.insert(0, '')
22 sys.path.insert(0, '')
23
23
24 import sys, os
25 from optparse import OptionParser
24 from optparse import OptionParser
25 import os
26
26
27 from twisted.application import service
27 from twisted.application import service
28 from twisted.internet import reactor
28 from twisted.internet import reactor
@@ -309,7 +309,7 b' you want to unlock the door and enter your house. As with your house, you want'
309 to be able to create the key (or FURL file) once, and then simply use it at
309 to be able to create the key (or FURL file) once, and then simply use it at
310 any point in the future.
310 any point in the future.
311
311
312 This is possible. but before you do this, you **must** remove any old FURL
312 This is possible, but before you do this, you **must** remove any old FURL
313 files in the :file:`~/.ipython/security` directory.
313 files in the :file:`~/.ipython/security` directory.
314
314
315 .. warning::
315 .. warning::
General Comments 0
You need to be logged in to leave comments. Login now