def copy(self, dest_basedir):
        self._populate_vars()
        dest_basedir = fs.abspath(dest_basedir)

        # first handle local files
        for tmpl_path in self._walk_path(self.basedir):
            dest_path = fs.abspath(re.sub(self.basedir, dest_basedir, tmpl_path))
            self._copy_path(tmpl_path, dest_path)

        # second handle external files
        if self.config.keys() in 'external_files':
            for _file, remote_uri in self.config['external_files'].items():
                dest_path = self._sub(os.path.join(dest_basedir, _file))
                remote_uri = self._sub(remote_uri)
                try:
                    data = self._sub(urlopen(remote_uri).read())
                except HTTPError as e:
                    data = ''

                self._write_file(dest_path, data)

        # lastly do injections
        if 'injections' in self.config.keys() \
            and len(self.config['injections']) > 0:
            for dest_path in self._walk_path(dest_basedir):
                self._inject_or_pass(dest_path)
dataset/ETHPy150Open datafolklabs/boss/boss/cli/template.py/TemplateManager.copy/swapped operands of `in`