[gvfs] gvfs-test: Handle missing ~/.ssh/id_rsa gracefully



commit 500951b5d8671d35739ed28ffcb28be53be1cd24
Author: Tomas Bzatek <tbzatek redhat com>
Date:   Thu Jan 24 15:59:07 2013 +0100

    gvfs-test: Handle missing ~/.ssh/id_rsa gracefully
    
    The 'sshd' attribute may not be set if we hit the non-existing
    ~/.ssh/id_rsa' test.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691568

 test/gvfs-test |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/test/gvfs-test b/test/gvfs-test
index 3f2667a..08b3f0c 100755
--- a/test/gvfs-test
+++ b/test/gvfs-test
@@ -453,7 +453,7 @@ Subsystem sftp %(sftp_server)s
         if result:
             orig_err_fail = result.errors + result.failures
         super().run(result)
-        if result and result.errors + result.failures > orig_err_fail:
+        if result and result.errors + result.failures > orig_err_fail and hasattr(self, 'sshd'):
             print('\n----- sshd log -----\n%s\n------\n' % self.sshd.stderr.read())
 
     def test_rsa(self):



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