• 
      

    Check length of argv in manage.py

    Review Request #136 — Created Aug. 6, 2007 and submitted — Latest diff uploaded

    Information

    Review Board SVN (deprecated)
    trunk
    188

    Reviewers

    Running ./manage.py with no arguments and DEBUG enabled causes a stack trace:
    
    $ ./manage.py
    Traceback (most recent call last):
      File "./manage.py", line 82, in <module>
        if sys.argv[1] == 'runserver' or sys.argv[1] == 'test':
    IndexError: list index out of range
    
    This patch adds a check for the length of argv.
    Ran ./manage.py with and without arguments.