Merge "Return lists from listing functions"
This commit is contained in:
commit
04537022f9
@ -299,7 +299,7 @@ class Gerrit(object):
|
|||||||
# separated by ' - ' sequence
|
# separated by ' - ' sequence
|
||||||
cmd += ' --description'
|
cmd += ' --description'
|
||||||
out, err = self._ssh(cmd)
|
out, err = self._ssh(cmd)
|
||||||
return filter(None, out.split('\n'))
|
return list(filter(None, out.split('\n')))
|
||||||
|
|
||||||
def listGroups(self, verbose=False):
|
def listGroups(self, verbose=False):
|
||||||
if verbose:
|
if verbose:
|
||||||
@ -307,7 +307,7 @@ class Gerrit(object):
|
|||||||
else:
|
else:
|
||||||
cmd = 'gerrit ls-groups'
|
cmd = 'gerrit ls-groups'
|
||||||
out, err = self._ssh(cmd)
|
out, err = self._ssh(cmd)
|
||||||
return filter(None, out.split('\n'))
|
return list(filter(None, out.split('\n')))
|
||||||
|
|
||||||
def listGroup(self, group, verbose=False):
|
def listGroup(self, group, verbose=False):
|
||||||
if verbose:
|
if verbose:
|
||||||
@ -317,7 +317,7 @@ class Gerrit(object):
|
|||||||
# ensure group names with spaces are escaped and quoted
|
# ensure group names with spaces are escaped and quoted
|
||||||
group = "\"%s\"" % group.replace(' ', '\ ')
|
group = "\"%s\"" % group.replace(' ', '\ ')
|
||||||
out, err = self._ssh(' '.join([cmd, '-q', group]))
|
out, err = self._ssh(' '.join([cmd, '-q', group]))
|
||||||
return filter(None, out.split('\n'))
|
return list(filter(None, out.split('\n')))
|
||||||
|
|
||||||
def listPlugins(self):
|
def listPlugins(self):
|
||||||
plugins = self.getPlugins()
|
plugins = self.getPlugins()
|
||||||
|
Loading…
Reference in New Issue
Block a user