X-Git-Url: http://git.vrable.net/?p=cumulus.git;a=blobdiff_plain;f=python%2Fcumulus%2Fstore%2Fsftp.py;h=f7818614552a9ae184884159efe56e028724e6ee;hp=e87c0983e9ea2ea2574c558a08f733b4dac4e5a2;hb=64bff41cb3ccdd60e767a5bb9ed8525d2dda1966;hpb=ac2119cf623ab1c2ea2a4e46005c2eee94a85ec0 diff --git a/python/cumulus/store/sftp.py b/python/cumulus/store/sftp.py index e87c098..f781861 100644 --- a/python/cumulus/store/sftp.py +++ b/python/cumulus/store/sftp.py @@ -1,4 +1,21 @@ -# vim: ai ts=4 sts=4 et sw=4 +# Cumulus: Efficient Filesystem Backup to the Cloud +# Copyright (C) 2010 The Cumulus Developers +# See the AUTHORS file for a list of contributors. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + #needed for python 2.5 from __future__ import with_statement @@ -48,16 +65,11 @@ class SFTPStore(Store): does not support password authentication or password protected authentication keys""" def __init__(self, url, **kw): - if self.path.find('@') != -1: + if self.netloc.find('@') != -1: user, self.netloc = self.netloc.split('@') else: user = None -# if self.netloc.find(':') != -1: -# host, self.path = self.netloc.split(':') -# else: -# host, self.path = self.netloc.split('/', 1) - self.config = SSHHostConfig(self.netloc, user) host_keys = paramiko.util.load_host_keys(os.path.expanduser('~/.ssh/known_hosts'))