Ticket #2490: post_4227.diff

File post_4227.diff, 721 bytes (added by dev@…, 18 years ago)

update to r4227

  • runtests.py

     
    139139    options, args = parser.parse_args()
    140140    if options.settings:
    141141        os.environ['DJANGO_SETTINGS_MODULE'] = options.settings
    142 
     142    elif not os.environ.has_key('DJANGO_SETTINGS_MODULE'):
     143        try:
     144            import settings
     145            os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
     146        except ImportError:
     147            parser.print_help()         
     148            print "\nERROR: No settings file found. Please use --settings=some_setting_file"
     149            sys.exit(-1)
     150   
    143151    django_tests(int(options.verbosity), args)
Back to Top