예제 #1
0
 def run(self):
     if self.command.package_uuid:
         workdir = os.path.join(get_packages_dir(), self.command.package_uuid)
     else:
         workdir = get_packages_dir()
     output, exitcode = launcher(self.command.start_file, self.command.params, workdir)
     return (output, exitcode)
예제 #2
0
 def run(self):
     path = self.command.dlp_client.get_package(self.command.package_uuid,
                                                workdir=get_packages_dir())
     if path:
         return ("%f O: Package downloaded at %s" % (time.time(), path), 0)
     else:
         return ("%f E: Failed to download package" % time.time(), 1)
예제 #3
0
파일: command.py 프로젝트: pavelpromin/mmc
 def run(self):
     package_dir = os.path.join(get_packages_dir(), self.command.package_uuid)
     if os.path.exists(package_dir):
         shutil.rmtree(package_dir)
     if os.path.exists(package_dir + ".zip"):
         os.unlink(package_dir + ".zip")
     return ("%f O: Package files removed" % time.time(), 0)
예제 #4
0
 def run(self):
     if self.command.package_uuid:
         package_dir = os.path.join(get_packages_dir(), self.command.package_uuid)
         if os.path.exists(package_dir):
             shutil.rmtree(package_dir)
         if os.path.exists(package_dir + ".zip"):
             os.unlink(package_dir + ".zip")
     return ("%f O: Package files removed" % time.time(), 0)