| 23 | | if project_name in INVALID_PROJECT_NAMES: |
| 24 | | raise CommandError("%r conflicts with the name of an existing Python module and cannot be used as a project name. Please try another name." % project_name) |
| | 23 | try: |
| | 24 | proj_name = __import__(project_name) |
| | 25 | if proj_name: |
| | 26 | raise CommandError("%r conflicts with the name of an existing Python module and cannot be used as a project name. Please try another name." % project_name) |
| | 27 | except ImportError: |
| | 28 | if project_name in INVALID_PROJECT_NAMES: |
| | 29 | raise CommandError("%r contains an invalid project name. Please try another name." % project_name) |