]> thyrsus.com Git - ssh-installkeys.git/commitdiff
Note when a file exists.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 22 Nov 2002 11:40:46 +0000 (11:40 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 22 Nov 2002 11:40:46 +0000 (11:40 +0000)
ssh-installkeys

index ed745ecfcb62c8d53404e70184a2edccb2246b64..f07cac8d96dc1dc9634f4e1c487410d503acb78d 100755 (executable)
@@ -46,8 +46,8 @@ License: Python Software Foundation License
 
 Noah Spurrier
 
-$Revision: 1.4 $
-$Date: 2002/11/22 11:33:08 $
+$Revision: 1.5 $
+$Date: 2002/11/22 11:35:37 $
 """
 import os, sys
 import select
@@ -68,7 +68,7 @@ A critical module was not found. Probably this OS does not support it.
 Currently pexpect is intended for UNIX operating systems (including OS-X)."""
 
 __version__ = '0.94'
-__revision__ = '$Revision: 1.4 $'
+__revision__ = '$Revision: 1.5 $'
 __all__ = ['ExceptionPexpect', 'EOF', 'TIMEOUT', 'spawn',
     '__version__', '__revision__']
 
@@ -728,7 +728,7 @@ class ssh_session:
                 print "Correcting permissions..."
                 session.remote("/bin/chmod u+r,g-w,o-w %s" % file) 
     def forcefile(self, file, command):
-        "Create file with command idf it does not already exist."
+        "Create file with command if it does not already exist."
         perms = session.checkfile(file)
         if perms is None:
             print "Remote %s doesn't exist." % file
@@ -738,6 +738,8 @@ class ssh_session:
                 print "Creating remote %s" % file
                 session.remote(command)
                 perms = session.checkfile(file)
+        else:
+            print file, "already exists."
         return perms
 
 if __name__ == '__main__': 
@@ -831,4 +833,3 @@ if __name__ == '__main__':
     print "Done."
 
 # End
-