[Freeipa-devel] [patch]-pytest-multihost-Return File Attributes to sftp.put
Tomas Babej
tbabej at redhat.com
Thu Aug 13 12:48:16 UTC 2015
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.
Cc-ing Petr to chime in.
Tomas
More information about the Freeipa-devel
mailing list