File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33#
44#
55# This file is part of zenoss_client.
6- #
6+ #
77# zenoss_client is free software: you can redistribute it and/or
88# modify it under the terms of the GNU General Public License as published
99# by the Free Software Foundation, either version 3 of the License, or (at
1010# your option) any later version.
11- #
11+ #
1212# zenoss_client is distributed in the hope that it will be useful,
1313# but WITHOUT ANY WARRANTY; without even the implied warranty of
1414# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
1515# Public License for more details.
16- #
16+ #
1717# You should have received a copy of the GNU General Public License along
1818# with zenoss_client. If not, see <http://www.gnu.org/licenses/>.
1919#############################################################################
@@ -44,7 +44,7 @@ def get_devices(uid = '/zport/dmd/Devices', opts = {})
4444 resp = json_request ( 'DeviceRouter' , 'getDevices' , [ data ] )
4545
4646 devs = [ ]
47- resp [ 'devices' ] . each do |dev |
47+ resp [ 'devices' ] && resp [ 'devices' ] . each do |dev |
4848 devs << Model ::Device . new ( self , dev )
4949 end
5050 devs
You can’t perform that action at this time.
0 commit comments