Exemple #1
0
 def test_shortPythonVersion(self):
     """
     Verify if the Python version is returned correctly.
     """
     ver = shortPythonVersion().split('.')
     for i in range(3):
         self.assertEqual(int(ver[i]), sys.version_info[i])
Exemple #2
0
 def test_shortPythonVersion(self):
     """
     Verify if the Python version is returned correctly.
     """
     ver = shortPythonVersion().split('.')
     for i in range(3):
         self.assertEqual(int(ver[i]), sys.version_info[i])
Exemple #3
0
 def _initialLog(self):
     """
     Print twistd start log message.
     """
     from twisted.internet import reactor
     log.msg(
         "twistd %s (%s %s) starting up." %
         (copyright.version, sys.executable, runtime.shortPythonVersion()))
     log.msg('reactor class: %s.' % (qual(reactor.__class__), ))
Exemple #4
0
 def _initialLog(self):
     """
     Print twistd start log message.
     """
     from twisted.internet import reactor
     log.msg("twistd %s (%s %s) starting up." % (copyright.version,
                                                sys.executable,
                                                runtime.shortPythonVersion()))
     log.msg('reactor class: %s.' % (qual(reactor.__class__),))
Exemple #5
0
 def _initialLog(self):
     """
     Print twistd start log message.
     """
     from twisted.internet import reactor
     logger._loggerFor(self).info(
         "twistd {version} ({exe} {pyVersion}) starting up.",
         version=copyright.version, exe=sys.executable,
         pyVersion=runtime.shortPythonVersion())
     logger._loggerFor(self).info('reactor class: {reactor}.',
                                  reactor=qual(reactor.__class__))
Exemple #6
0
 def _initialLog(self):
     """
     Print twistd start log message.
     """
     from twisted.internet import reactor
     logger._loggerFor(self).info(
         "twistd {version} ({exe} {pyVersion}) starting up.",
         version=copyright.version, exe=sys.executable,
         pyVersion=runtime.shortPythonVersion())
     logger._loggerFor(self).info('reactor class: {reactor}.',
                                  reactor=qual(reactor.__class__))
def initialLog():
    from twisted.internet import reactor
    log.msg("twistd %s (%s %s) starting up" % (copyright.version,
                                               sys.executable,
                                               runtime.shortPythonVersion()))
    log.msg('reactor class: %s' % reactor.__class__)
Exemple #8
0
def initialLog():
    from twisted.internet import reactor
    log.msg("twistd %s (%s %s) starting up" %
            (copyright.version, sys.executable, runtime.shortPythonVersion()))
    log.msg('reactor class: %s' % reactor.__class__)
Exemple #9
0
            import signal
            def rotateLog(signal, frame, logFile=logFile):
                from twisted.internet import reactor
                reactor.callLater(0, logFile.rotate)
            signal.signal(signal.SIGUSR1, rotateLog)


    oldstdin = sys.stdin
    oldstdout = sys.stdout
    oldstderr = sys.stderr
    if not config['syslog']:
        log.startLogging(logFile)
    sys.stdout.flush()
    log.msg("twistd %s (%s %s) starting up" % (copyright.version,
                                               sys.executable,
                                               runtime.shortPythonVersion()))

    from twisted.internet import reactor
    log.msg('reactor class: %s' % reactor.__class__)

    try:
        application = loadApplication(config, passphrase)
    except Exception, e:
        s = "Failed to load application: %s" % (e,)
        traceback.print_exc(file=log.logfile)
        log.msg(s)
        log.deferr()
        sys.exit('\n' + s + '\n')
    
    if not config['originalname']:
        if application.processName and application.processName != sys.argv[0]:
Exemple #10
0
def initialLog():
	from twisted.internet import reactor
	log.msg("PNFS %s (%s %s) starting up" % (version,
											   sys.executable,
											   shortPythonVersion()))
	log.msg('reactor class: %s' % reactor.__class__)