Commits

Alessio Deiana  committed 20a96f3

Minor cleanup

  • Participants
  • Parent commits daa2c59

Comments (0)

Files changed (2)

File src/invenio_devscripts/mailserve.py

 def printing_smtpd(addr, port):
     """
     Start a mail debug server
-    
+
     Remember to update your invenio-local.cfg
     """
     addr = addr
     except Exception:
         print("%s is not a valid port number." % port)
         return
-    
-    try: 
+
+    try:
         print """Remember to set the two following settings in invenio-local.conf:
 
 CFG_MISCUTIL_SMTP_HOST=%s
 def main():
     """Script entrance"""
     (options, args) = parse_cli_options()
-    
+
     printing_smtpd(options.bind_address, options.bind_port)
 
 
 if __name__ == '__main__':
     main()
-        

File src/invenio_devscripts/serve.py

 import optparse
 import socket
 import traceback
-import sys
 from itertools import chain
 
 try:
             raise
 
 
-
 def start_server(options, server_socket, static_files=config.STATIC_FILES):
     """Start a new http server
 
 
     if options.use_pdb:
         import pdb
+
         def pdb_on_error(f, *args, **kwargs):
             try:
                 f(*args, **kwargs)
                          and 'http' or 'https', display_hostname, server_port)
     return server_socket
 
+
 def prepare_server(options, ssl_context=None):
     """Prepare http server
 
 def main():
     """Script entrance"""
     (options, args) = parse_cli_options()
-    
+
     # Override config SRC_PATH and INSTALL_PATH
     if options.src_path:
         config.SRC_PATH = [os.path.expanduser(x) for x in options.src_path]
     if options.install_path:
         config.INSTALL_PATH = os.path.expanduser(options.install_path)
 
-
     if options.serve_http and options.auto_reload:
         print 'HTTP Server mode with reload mode'
         prepare_server(options)