[Freeipa-devel] [patch]-pytest-multihost-Return File Attributes to sftp.put

Niranjan mrniranjan at fedoraproject.org
Thu Aug 13 13:26:03 UTC 2015


Tomas Babej wrote:
> 
> 
> On 08/13/2015 01:55 PM, Niranjan wrote:
> > Greetings,
> > 
> > This patch is regarding pytest-multihost plugin. 
> > Including a patch to return FileAttributes for sftp.put function
> > used in the function.
> > 
> > Current put_file function in transport.py in ParamikoTransport Class doesn't
> > return any value. So when using this function it's not clear if the operation
> > was sucessfull or not. 
> > 
> > Returning FileAttributes to put_file function helps in checking if operation
> > was indeed succesful. 
> > 
> > Requesting feedback on the patch attached.
> > 
> > Regards
> > Niranjan 
> > 
> > 
> > 
> 
> Note that ParamikoTransport is not the only kind of Transport class in
> the python-multihost. So using the FileAttributes to distinguish
> success/failure does not seem like the way to go.
> 
> If you want to distinguish between a successful/unsuccessful put_file
> call, we should return a boolean value, or rather raise an exception.
I agree, exception would be better approach.
> 
> Cc-ing Petr to chime in.
> 
> Tomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 311 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20150813/1288bf8e/attachment.sig>


More information about the Freeipa-devel mailing list