fix bug
This commit is contained in:
@@ -203,8 +203,9 @@ class PartitionTableBackup:
|
||||
# 使用 sfdisk 备份分区表
|
||||
result = subprocess.run(
|
||||
["sudo", "sfdisk", "-d", device_path],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
encoding='utf-8',
|
||||
check=True,
|
||||
timeout=30
|
||||
)
|
||||
@@ -236,8 +237,10 @@ class PartitionTableBackup:
|
||||
result = subprocess.run(
|
||||
["sudo", "sfdisk", device_path],
|
||||
input=partition_data,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
stdin=subprocess.PIPE,
|
||||
encoding='utf-8',
|
||||
check=True,
|
||||
timeout=30
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user