[Assorted-commits] SF.net SVN: assorted:[1380] sharing-gateway/trunk/src/gateway.py
Brought to you by:
yangzhang
From: <yan...@us...> - 2009-05-07 05:39:36
|
Revision: 1380 http://assorted.svn.sourceforge.net/assorted/?rev=1380&view=rev Author: yangzhang Date: 2009-05-07 05:39:31 +0000 (Thu, 07 May 2009) Log Message: ----------- made ssh key optional Modified Paths: -------------- sharing-gateway/trunk/src/gateway.py Modified: sharing-gateway/trunk/src/gateway.py =================================================================== --- sharing-gateway/trunk/src/gateway.py 2009-05-07 05:37:56 UTC (rev 1379) +++ sharing-gateway/trunk/src/gateway.py 2009-05-07 05:39:31 UTC (rev 1380) @@ -54,8 +54,10 @@ sudo( 'mount -t cifs -o'.split() + [ 'user=%(user)s,pass=%(pass)s,ip=%(ip)s' % d, s.share, mountpt ] ) elif s.type == 'sshfs': - sudo( [ 'sshfs', s.share, mountpt, - '-o', 'IdentityFile=%(key)s' % d, '-o', 'allow_other' ] ) + flags = [] + if 'key' in d: flags += [ '-o', 'IdentityFile=%(key)s' % d ] + sudo( [ 'sshfs', s.share, mountpt, '-o', 'allow_other' ] + + flags ) elif s.type == 'bind': sudo( [ 'mount', '--bind', s.share, mountpt ] ) else: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |