[entropy.tools] drop compress_tar_bz2, no longer needed
This commit is contained in:
@@ -1969,31 +1969,6 @@ def is_valid_uri(url):
|
||||
# invalid IPv6 URL
|
||||
return False
|
||||
|
||||
def compress_tar_bz2(store_path, path_to_compress):
|
||||
"""
|
||||
Compress path_to_compress path into store_path path using tar and bzip2.
|
||||
|
||||
@param store_path: file path where to write .tar.bz2
|
||||
@type store_path: string
|
||||
@param path_to_compress: path to compress to .tar.bz2 file
|
||||
@type path_to_compress: string
|
||||
@return: execution return code
|
||||
@rtype: int
|
||||
"""
|
||||
pid = os.fork()
|
||||
if pid == 0:
|
||||
os.chdir(path_to_compress)
|
||||
proc = subprocess.Popen(("tar", "cjf", store_path),
|
||||
stdout = subprocess.PIPE, stderr = subprocess.PIPE)
|
||||
rc = proc.wait()
|
||||
if proc.stdout is not None:
|
||||
proc.stdout.close()
|
||||
if proc.stdout is not None:
|
||||
proc.stderr.close()
|
||||
os._exit(rc)
|
||||
else:
|
||||
return os.waitpid(pid, 0)[1] # return rc
|
||||
|
||||
def _fix_uid_gid(tarinfo, epath):
|
||||
# workaround for buggy tar files
|
||||
uname = tarinfo.uname
|
||||
|
||||
Reference in New Issue
Block a user