viewgit/index.php:465 Only variables should be passed by reference [2048]

viewgit/index.php:466 Non-static method GeSHi::get_language_name_from_extension() should not be called statically [2048]

  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # This is a simple whois daemon intended to
  5. # provide a basic whois for GNet.
  6. #
  7.  
  8. import pywhois
  9. from optparse import OptionParser
  10.  
  11. if __name__ == "__main__":
  12.  
  13. parser = OptionParser()
  14. parser.add_option("-v", "--verbose", action="store_true",
  15. default = False, help = "Print syslog to screen")
  16. parser.add_option("-c", "--config", dest="config_file",
  17. default="pywhoisd.conf",
  18. help = "Set config file", metavar="CONFIG_FILE")
  19. parser.add_option("-p", "--port", dest="port",
  20. help = "The listening port of the daemon", default = "43")
  21. parser.add_option("-l", "--listen", help="The listening address of the daemon",
  22. default = "0.0.0.0", dest="host")
  23.  
  24. (options, args) = parser.parse_args()
  25.  
  26. # Load configuration and create logger
  27. # istance
  28. config = pywhois.Config(options.config_file)
  29. logger = pywhois.Logger(options.verbose)
  30.  
  31. # Prepare the real server, listening to the whole world
  32. host, port = options.host, int(options.port)
  33. server = pywhois.WhoisServer((host, port), logger, config)
  34. try:
  35. server.serve_forever()
  36. except KeyboardInterrupt:
  37. logger.Log ("pywhoisd daemon exiting now")
  38.  
  39.  
  40.