Port devserver.sh to Python, and add optional port argument

Review Request #1570 — Created May 2, 2010 and submitted

Information

Review Board
master

Reviewers

Ported the devserver shell script to Python.  Now takes optional -p parameter to set server port.
Tested manually.  I ran from other directories, and moved various folders in order to trigger the error messages, and they all seem to do the job.
chipx86
  1. 
      
  2. contrib/internal/devserver.py (Diff revision 1)
     
     
     
     
    Imports should be in alphabetical order.
  3. contrib/internal/devserver.py (Diff revision 1)
     
     
     
     
     
     
    Two blank lines between the imports and the constants, and two between constants and functions.
  4. contrib/internal/devserver.py (Diff revision 1)
     
     
     
     
    Two blank lines between functions outside of a class.
  5. contrib/internal/devserver.py (Diff revision 1)
     
     
     
    One blank line before blocks (for loops, if statements, etc.)
  6. contrib/internal/devserver.py (Diff revision 1)
     
     
     
     
    Make sure we have \n in the right places.
    1. I've updated the string to have the \n in the same places as devserver.sh,
  7. contrib/internal/devserver.py (Diff revision 1)
     
     
    No need for the \ here.
  8. contrib/internal/devserver.py (Diff revision 1)
     
     
     
     
     
    Here too.
  9. contrib/internal/devserver.py (Diff revision 1)
     
     
    For readability purposes, can you put one of these \n on its own line? Each string fragment should ideally terminate at the \n
  10. contrib/internal/devserver.py (Diff revision 1)
     
     
    No need for the \, since it's in parens.
  11. contrib/internal/devserver.py (Diff revision 1)
     
     
     
    No need for the \ here too.
    
    I'd rather see this as:
    
    os.system('./reviewboard/manage.py ....%s'
              ' --adminmedia=....'
              % server_port)
  12. 
      
mike_conley
Review request changed
Change Summary:
Style changes in response to review.
chipx86
  1. Looks good, thanks! Committed to master (cbebd04)
  2.