def _cmd(self, *nargs):
cmd_str = '<STR_LIT:U+0020>'.join(map(quote, nargs))<EOL>if self.package.config.debug("<STR_LIT>"):<EOL><INDENT>print_debug("<STR_LIT>" % cmd_str)<EOL><DEDENT>p = popen(nargs, stdout=subprocess.PIPE, stderr=subprocess.PIPE,<EOL>cwd=self.pkg_root)<EOL>out, err = p.communicate()<EOL>if p.returncode:<EOL><INDENT>print_debug("<STR_LIT>")<EOL>print_debug(out)<EOL>print_debug("<STR_LIT>")<EOL>print_debug(err)<EOL>raise ReleaseVCSError("<STR_LIT>" % (cmd_str, err))<EOL><DEDENT>out = out.strip()<EOL>if out:<EOL><INDENT>return [x.rstrip() for x in out.split('<STR_LIT:\n>')]<EOL><DEDENT>else:<EOL><INDENT>return []<EOL><DEDENT>
Convenience function for executing a program such as 'git' etc.