Skip to content

Commit

Permalink
sshutils: fix AttributeErrors in SSHGlob class
Browse files Browse the repository at this point in the history
self.paramiko -> self.ssh
  • Loading branch information
jtriley committed Feb 26, 2013
1 parent 341f8bc commit a95ecd5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions starcluster/sshutils/__init__.py
Expand Up @@ -712,7 +712,7 @@ def iglob(self, pathname):
The pattern may contain simple shell-style wildcards a la fnmatch.
"""
if not glob.has_magic(pathname):
if self.paramiko.lpath_exists(pathname):
if self.ssh.lpath_exists(pathname):
yield pathname
return
dirname, basename = posixpath.split(pathname)
Expand All @@ -736,10 +736,10 @@ def glob0(self, dirname, basename):
if basename == '':
# `os.path.split()` returns an empty basename for paths ending with
# a directory separator. 'q*x/' should match only directories.
if self.paramiko.isdir(dirname):
if self.ssh.isdir(dirname):
return [basename]
else:
if self.paramiko.lexists(posixpath.join(dirname, basename)):
if self.ssh.lexists(posixpath.join(dirname, basename)):
return [basename]
return []

Expand All @@ -751,7 +751,7 @@ def glob1(self, dirname, pattern):
#dirname = unicode(dirname, encoding)
dirname = unicode(dirname, 'UTF-8')
try:
names = [posixpath.basename(n) for n in self.paramiko.ls(dirname)]
names = [posixpath.basename(n) for n in self.ssh.ls(dirname)]
except os.error:
return []
if pattern[0] != '.':
Expand Down

0 comments on commit a95ecd5

Please sign in to comment.