예제 #1
0
 def write(self, dst):
     args = self.create_args()
     fs.ensure_path(os.path.dirname(dst))
     if args:
         timeout = self.timeout or self.ctx.timeout
         p = Pipeline(*args, timeout=timeout, env=self.create_env())
         return p.write(dst, keep_rc=self.keep_rc)
예제 #2
0
 def write(self, dst):
     fs.ensure_path(os.path.dirname(dst))
     args = self.create_args()
     if args:
         p = Pipeline(*args, env=SAFE_ENV)
         p.write(dst)
     else:
         call([which("cp", env=SAFE_ENV), self.path, dst], env=SAFE_ENV)