diff --git a/master/buildbot/steps/shell.py b/master/buildbot/steps/shell.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/steps/shell.py
+++ b/master/buildbot/steps/shell.py
@@ -108,11 +108,11 @@ class ShellCommand(buildstep.LoggingBuildStep):
         if command:
             self.setCommand(command)
 
-        # command must be set either on class level (e.g. when specific
-        # subclass with fixed command is used), or in constructor.
-        # If anyone wishes to set command manually later, e.g. in run(),
-        # he should set it to dummy or default value.
-        assert self.command, "ShellCommand's `command' is not set"
+        if self.__class__ is ShellCommand:
+            # ShellCommand class is directly instantiated.
+            # Explicitly check that command is set to prevent runtime error
+            # later.
+            assert self.command, "ShellCommand's `command' is not set"
 
         # pull out the ones that LoggingBuildStep wants, then upcall
         buildstep_kwargs = {}
check that ShellCommand.command is set only if it's directly instantiated