diff --git a/client/lib/engine/bin/ProtocolLib.py b/client/lib/engine/bin/ProtocolLib.py index 85e536c..352c7b1 100644 --- a/client/lib/engine/bin/ProtocolLib.py +++ b/client/lib/engine/bin/ProtocolLib.py @@ -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 + #/**