Ticket #12846: pyc-loader.diff

File pyc-loader.diff, 582 bytes (added by dap, 6 years ago)
  • core/management/__init__.py

    old new  
    2222    """
    2323    command_dir = os.path.join(management_dir, 'commands')
    2424    try:
    25         return [f[:-3] for f in os.listdir(command_dir)
    26                 if not f.startswith('_') and f.endswith('.py')]
     25        return [os.path.splitext(f)[0] for f in os.listdir(command_dir)
     26                if not f.startswith('_') and (f.endswith('.py') or f.endswith('.pyc'))]
    2727    except OSError:
    2828        return []
    2929
Back to Top