Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use importlib instead of imp.

This is for the same reasons as commit: 96ff40f
  • Loading branch information...
commit 373a6f56a19c131debfb47f7d610280a586661f7 1 parent 09c96ac
@oremj oremj authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 services/
6 services/
@@ -4,7 +4,6 @@
import os
# get the right settings module
-import imp
settingmodule = os.environ.get('DJANGO_SETTINGS_MODULE', 'settings_local')
if settingmodule.startswith(('zamboni', # typical git clone destination
'workspace', # Jenkins
@@ -12,8 +11,6 @@
settingmodule = settingmodule.split('.', 1)[1]
-res = imp.find_module(settingmodule)
-settings = imp.load_module(settingmodule, *res)
import posixpath
import re
@@ -26,6 +23,9 @@
from import setup_environ
import commonware.log
+from django.utils import importlib
+settings = importlib.import_module(settingmodule)
# Pyflakes will complain about these, but they are required for setup.
from lib.log_settings_base import formatters, handlers, loggers
Please sign in to comment.
Something went wrong with that request. Please try again.