mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Fix pecl list if no package installed
This commit is contained in:
parent
0bc4d05f31
commit
1a9f41ced4
@ -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