From 014555d494a0f57b681733ccfed46e7895c5b38b Mon Sep 17 00:00:00 2001 From: LiuNanke Date: Sat, 2 Jan 2016 04:24:54 +0800 Subject: [PATCH] py3: replace reload with six.moves.reload_module Get the reload() function from six.moves.reload_module(). There have one more place should be modified. Change-Id: I129df5935524f56b15525e17170cb74a5616201e Partial-Implements: blueprint porting-python3 --- openstack_dashboard/contrib/developer/theme_preview/tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openstack_dashboard/contrib/developer/theme_preview/tests.py b/openstack_dashboard/contrib/developer/theme_preview/tests.py index 009f4c7094..753ec4bc66 100644 --- a/openstack_dashboard/contrib/developer/theme_preview/tests.py +++ b/openstack_dashboard/contrib/developer/theme_preview/tests.py @@ -17,6 +17,7 @@ from django.conf import settings from django.core import urlresolvers from django.core.urlresolvers import reverse from django.utils.importlib import import_module # noqa +from six import moves from horizon import base @@ -30,7 +31,7 @@ class ThemePreviewTests(test.TestCase): def setUp(self): super(ThemePreviewTests, self).setUp() urlresolvers.clear_url_caches() - reload(import_module(settings.ROOT_URLCONF)) + moves.reload_module(import_module(settings.ROOT_URLCONF)) base.Horizon.register(Developer) base.Horizon._urls()