mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #2331 from danielliang/develop
Fix pecl list if no package installed
This commit is contained in:
commit
23de10fb2b
@ -55,12 +55,19 @@ def list():
|
||||
List installed pecl extensions.
|
||||
'''
|
||||
|
||||
pecls = {}
|
||||
lines = _pecl('list').splitlines()
|
||||
lines.pop(0)
|
||||
'''
|
||||
Only one line if no package installed:
|
||||
(no packages installed from channel pecl.php.net)
|
||||
'''
|
||||
if not lines:
|
||||
return pecls
|
||||
|
||||
lines.pop(0)
|
||||
lines.pop(0)
|
||||
|
||||
pecls = {}
|
||||
for line in lines:
|
||||
m = re.match('^([^ ]+)[ ]+([^ ]+)[ ]+([^ ]+)', line)
|
||||
if m:
|
||||
|
Loading…
Reference in New Issue
Block a user