refs #1101 add ogUcastReceiverPartition()
parent
1e5a2b79f7
commit
d75e8a56fa
|
@ -144,12 +144,29 @@ def ogUcastSendPartition (disk, par, sess, tool, level):
|
|||
#@param 1 disk
|
||||
#@param 2 partition
|
||||
#@param 3 session unicast
|
||||
#@param 4 tool image
|
||||
#@param 5 tool compresor
|
||||
#@return
|
||||
#@exception OG_ERR_FORMAT
|
||||
#@exception OG_ERR_UCASTRECEIVERPARTITION
|
||||
#@note
|
||||
#@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
|
||||
|
||||
|
||||
|
||||
#/**
|
||||
|
|
Loading…
Reference in New Issue