← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jtv/maas/a-snack-for-doris into lp:maas

 

Jeroen T. Vermeulen has proposed merging lp:~jtv/maas/a-snack-for-doris into lp:maas.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jtv/maas/a-snack-for-doris/+merge/106560

This fixes some lint that made it impossible to get past “make lint check” on a development branch.

In particular, the linter complained about “from […] import *” because that stops it from checking for undefined identifiers.  Luckily we have a helper method that lets us import a module normally first, and then merge the module's settings into the local ones.

We do, meanwhile, still have a test failure and 8 test errors in trunk.  The errors appear to be due to the poweraction module and tests importing “settings” from django.conf; the failure appears to be due to some unforeseen change in poweraction.  All appear to be unrelated to this lint.


Jeroen
-- 
https://code.launchpad.net/~jtv/maas/a-snack-for-doris/+merge/106560
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/maas/a-snack-for-doris into lp:maas.
=== modified file 'src/maas/celeryconfig.py'
--- src/maas/celeryconfig.py	2012-05-21 00:19:07 +0000
+++ src/maas/celeryconfig.py	2012-05-21 04:31:17 +0000
@@ -1,7 +1,11 @@
 # Copyright 2012 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
-"""Celery settings for the maas project."""
+"""Celery settings for the maas project.
+
+Do not edit this file.  Instead, put custom settings in a module named
+user_maasceleryconfig.py somewhere on the PYTHONPATH.
+"""
 
 from __future__ import (
     absolute_import,
@@ -11,13 +15,15 @@
 
 __metaclass__ = type
 
-# Do not edit this file, instead put custom settings in
-# user_maasceleryconfig.py somewhere on the PYTHONPATH.
+from maas import import_settings
+
 
 try:
-    from user_maasceleryconfig import *
+    import user_maasceleryconfig
 except ImportError:
     pass
+else:
+    import_settings(user_maasceleryconfig)
 
 
 CELERY_IMPORTS = (

=== modified file 'src/provisioningserver/power/poweraction.py'
--- src/provisioningserver/power/poweraction.py	2012-05-18 06:17:04 +0000
+++ src/provisioningserver/power/poweraction.py	2012-05-21 04:31:17 +0000
@@ -33,7 +33,7 @@
 
 class PowerAction:
     """Actions for power-related operations.
-    
+
     :param power_type: A value from :class:`POWER_TYPE`.
 
     The class is intended to be used in two phases: