コード例 #1
0
ファイル: helpers.py プロジェクト: phobos182/cloud-init
 def replicateTestRoot(self, example_root, target_root):
     real_root = self.resourceLocation()
     real_root = os.path.join(real_root, 'roots', example_root)
     for (dir_path, _dirnames, filenames) in os.walk(real_root):
         real_path = dir_path
         make_path = rebase_path(real_path[len(real_root):], target_root)
         util.ensure_dir(make_path)
         for f in filenames:
             real_path = util.abs_join(real_path, f)
             make_path = util.abs_join(make_path, f)
             shutil.copy(real_path, make_path)
コード例 #2
0
 def replicateTestRoot(self, example_root, target_root):
     real_root = resourceLocation()
     real_root = os.path.join(real_root, 'roots', example_root)
     for (dir_path, _dirnames, filenames) in os.walk(real_root):
         real_path = dir_path
         make_path = rebase_path(real_path[len(real_root):], target_root)
         util.ensure_dir(make_path)
         for f in filenames:
             real_path = util.abs_join(real_path, f)
             make_path = util.abs_join(make_path, f)
             shutil.copy(real_path, make_path)