Ticket #2490: post_r3661.diff

File post_r3661.diff, 729 bytes (added by dev@…, 18 years ago)

updated patch for post r3661

  • runtests.py

     
    120120    options, args = parser.parse_args()
    121121    if options.settings:
    122122        os.environ['DJANGO_SETTINGS_MODULE'] = options.settings
    123        
     123    elif not os.environ.has_key('DJANGO_SETTINGS_MODULE'):
     124        try:
     125            import settings
     126            os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
     127        except ImportError:
     128            parser.print_help()         
     129            print "\nERROR: No settings file found. Please use --settings=some_setting_file"
     130            sys.exit(-1)
     131   
    124132    django_tests(int(options.verbosity), args)
Back to Top