#NEWLINE# @ contextmanager #NEWLINE# def writer( self ) : #NEWLINE# #INDENT# '\n        Read in zfs stream.\n        ' #NEWLINE# if self . _exists ( ) : #NEWLINE# #INDENT# cmd = [ b'zfs' , b'receive' , b'-F' , self . name ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# cmd = [ b'zfs' , b'receive' , self . name ] #NEWLINE# #UNINDENT# process = Popen ( cmd , stdin = PIPE ) #NEWLINE# succeeded = False #NEWLINE# try : #NEWLINE# #INDENT# ( yield process . stdin ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# process . stdin . close ( ) #NEWLINE# succeeded = ( not process . wait ( ) ) #NEWLINE# #UNINDENT# if succeeded : #NEWLINE# #INDENT# check_call ( [ b'zfs' , b'set' , ( b'mountpoint=' + self . _mountpoint . path ) , self . name ] )