blob: 9b2b05c9717a4e2d1eeb66391d049051528eae22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
virt-test: Fixed asset uncompression
Fix a mismatch in the uncompress command to allow it to work also with
the other compression types.
Upstream-Status: Accepted
https://github.com/autotest/virt-test/commit/a4f4b89b0bf3adffb0188f4091b5c66d41f7eba7
Signed-off-by: Petre Pircalabu <petre.pircalabu@enea.com>
--- a/virttest/asset.py
+++ b/virttest/asset.py
@@ -91,13 +91,13 @@ def uncompress_asset(asset_info, force=F
if match:
if match.group(1) == 'gz':
uncompress_cmd = ('gzip -cd %s > %s' %
- (destination_uncompressed, destination))
+ (destination, destination_uncompressed))
elif match.group(1) == 'xz':
uncompress_cmd = ('xz -cd %s > %s' %
- (destination_uncompressed, destination))
+ (destination, destination_uncompressed))
elif match.group(1) == 'bz2':
uncompress_cmd = ('bzip2 -cd %s > %s' %
- (destination_uncompressed, destination))
+ (destination, destination_uncompressed))
elif match.group(1) == '7z':
uncompress_cmd = '7za -y e %s' % destination
else:
|