Re: [PATCH 2/3] Drop the connection if some credentials cannot be set.



On Wed, Aug 19, 2009 at 05:29:51PM +0100, John Haxby wrote:
> ---
>  examples/gvncviewer.py |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/examples/gvncviewer.py b/examples/gvncviewer.py
> index 2debf76..9a74268 100644
> --- a/examples/gvncviewer.py
> +++ b/examples/gvncviewer.py
> @@ -131,7 +131,9 @@ def vnc_auth_cred(src, credList):
>  
>      for i in range(len(credList)):
>          if i < len(data) and data[i] != None:
> -            src.set_credential(credList[i], data[i])
> +            if src.set_credential(credList[i], data[i]):
> +                print "Cannot set credential type %d" % (credList[i])
> +                src.close()
>          else:
>              print "Unsupported credential type %d" % (credList[i])
>              src.close()
> -- 

ACK, This looks good.


Daniel
-- 
|: http://berrange.com/     -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://freshmeat.net/~danielpb/    -o-   http://gtk-vnc.sourceforge.net :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]