Code

Ticket #12846: pyc-loader.diff

File pyc-loader.diff, 582 bytes (added by dap, 4 years ago)
Line 
1--- django102.orig/core/management/__init__.py 2008-11-18 21:44:21.000000000 -0800
2+++ django/core/management/__init__.py  2009-09-30 15:39:50.000000000 -0700
3@@ -22,8 +22,8 @@
4     """
5     command_dir = os.path.join(management_dir, 'commands')
6     try:
7-        return [f[:-3] for f in os.listdir(command_dir)
8-                if not f.startswith('_') and f.endswith('.py')]
9+        return [os.path.splitext(f)[0] for f in os.listdir(command_dir)
10+                if not f.startswith('_') and (f.endswith('.py') or f.endswith('.pyc'))]
11     except OSError:
12         return []
13
14