Bug 1177476 - Fix require_conditions regression in mach, r=gps
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Thu, 25 Jun 2015 15:44:11 -0400
changeset 281054 41c7369a3090636616cbfd949228f5c096496fbf
parent 281053 247ca4bf258ea72aa5be01b6e79daf8174b6fc3c
child 281055 195067eb3141098731da347a746d00c7eae62d1b
push idunknown
push userunknown
push dateunknown
reviewersgps
bugs1177476, 1176620
milestone41.0a1
Bug 1177476 - Fix require_conditions regression in mach, r=gps This is a regression from bug 1176620 that results in all Firefox mach commands showing up in the help for B2G, even though they don't work there.
python/mach/mach/decorators.py
--- a/python/mach/mach/decorators.py
+++ b/python/mach/mach/decorators.py
@@ -139,17 +139,17 @@ def CommandProvider(cls):
             continue
 
         # Ignore subcommands for now: we handle them later.
         if command.subcommand:
             continue
 
         seen_commands.add(command.name)
 
-        if command.conditions is None and Registrar.require_conditions:
+        if not command.conditions and Registrar.require_conditions:
             continue
 
         msg = 'Mach command \'%s\' implemented incorrectly. ' + \
               'Conditions argument must take a list ' + \
               'of functions. Found %s instead.'
 
         if not isinstance(command.conditions, collections.Iterable):
             msg = msg % (command.name, type(command.conditions))