swc-installation-test-2.py: Raise an error on empty version stream
authorW. Trevor King <wking@tremily.us>
Fri, 8 Mar 2013 19:17:56 +0000 (14:17 -0500)
committerW. Trevor King <wking@tremily.us>
Fri, 8 Mar 2013 19:17:56 +0000 (14:17 -0500)
This makes the upcoming mult-path checking easier to implement.

setup/swc-installation-test-2.py

index 6da7ce7e47bd864037aaa7c5ccc30923ee076161..ded36f6b4dfa2e18bff4b633d4fe42eaa5db4a2b 100755 (executable)
@@ -438,6 +438,11 @@ class CommandDependency (Dependency):
             raise DependencyError(checker=self, message='\n'.join(lines))
         for name,string in [('stdout', stdout), ('stderr', stderr)]:
             if name == self.version_stream:
+                if not string:
+                    raise DependencyError(
+                        checker=self,
+                        message='empty version stream on {0} for {1}'.format(
+                            self.version_stream, command))
                 return string
         raise NotImplementedError(self.version_stream)