refs #1101 add ogUcastReceiverPartition()

code-review
Natalia Serrano 2024-11-13 11:02:29 +01:00
parent 1e5a2b79f7
commit d75e8a56fa
1 changed files with 17 additions and 0 deletions

View File

@ -144,12 +144,29 @@ def ogUcastSendPartition (disk, par, sess, tool, level):
#@param 1 disk #@param 1 disk
#@param 2 partition #@param 2 partition
#@param 3 session unicast #@param 3 session unicast
#@param 4 tool image
#@param 5 tool compresor
#@return #@return
#@exception OG_ERR_FORMAT #@exception OG_ERR_FORMAT
#@exception OG_ERR_UCASTRECEIVERPARTITION #@exception OG_ERR_UCASTRECEIVERPARTITION
#@note #@note
#@todo: #@todo:
#*/ ## #*/ ##
def ogUcastReceiverPartition (disk, par, sess, tool, level):
PART = DiskLib.ogDiskToDev (disk, par)
if not PART: return None
FileSystemLib.ogUnmount (disk, par)
cmd = ogUcastSyntax ('RECEIVERPARTITION', sess, device=PART, tool=tool, level=level)
if not cmd: return None
print (f'cmd ({cmd})')
try:
subprocess.run (cmd, shell=True, check=True)
except subprocess.CalledProcessError:
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_UCASTRECEIVERPARTITION, ' ')
return None
#/** #/**