def validate_sources(self):
    if (not self.sources):
        return
    for lang in ('cs', 'java'):
        if (lang in self.compilers):
            check_sources = list(self.sources)
            compiler = self.compilers[lang]
            if (not self.can_compile_remove_sources(compiler, check_sources)):
                m = 'No {} sources found in target {!r}'.format(lang, self.name)
                raise InvalidArguments(m)
            if check_sources:
                m = '{0} targets can only contain {0} files:\n'.format(lang.capitalize())
                m += '\n'.join([repr(c) for c in check_sources])
                raise InvalidArguments(m)
            assert (len(self.compilers) == 1)
            return
def validate_sources(self):
    if (not self.sources):
        return
    for lang in ('cs', 'java'):
        if (lang in self.compilers):
            check_sources = list(self.sources)
            compiler = self.compilers[lang]
            if (not self.can_compile_remove_sources(compiler, check_sources)):
                m = 'No {} sources found in target {!r}'.format(lang, self.name)
                raise InvalidArguments(m)
            if check_sources:
                m = '{0} targets can only contain {0} files:\n'.format(lang.capitalize())
                m += '\n'.join([repr(c) for c in check_sources])
                raise InvalidArguments(m)
            assert (len(self.compilers) == 1)
            return