mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-02-11 18:53:47 +02:00
Catch error when something that is not the GNS3 server answer to virtualbox requests
Fix #1155
This commit is contained in:
parent
3bb8cdafb2
commit
211f48d981
@ -15,7 +15,6 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import json.decoder
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
import logging
|
import logging
|
||||||
import asyncio
|
import asyncio
|
||||||
@ -232,10 +231,11 @@ class VirtualBoxGNS3VM(BaseGNS3VM):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
if resp:
|
if resp:
|
||||||
try:
|
if resp.status < 300:
|
||||||
json_data = yield from resp.json()
|
try:
|
||||||
except ValueError:
|
json_data = yield from resp.json()
|
||||||
pass
|
except ValueError:
|
||||||
|
pass
|
||||||
resp.close()
|
resp.close()
|
||||||
|
|
||||||
session.close()
|
session.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user