defined custom core command error that defaults to printing command output as well

This commit is contained in:
Blake J. Harnden 2018-03-02 16:22:20 -08:00
parent 29a3496eda
commit 974559843a
15 changed files with 90 additions and 81 deletions

View file

@ -3,8 +3,8 @@ utility.py: defines miscellaneous utility services.
"""
import os
import subprocess
from core import CoreCommandError
from core import constants
from core.misc import utils
from core.misc.ipaddress import Ipv4Prefix
@ -419,7 +419,7 @@ class HttpService(UtilService):
"""
try:
status, result = utils.cmd_output(['a2query', '-v'])
except subprocess.CalledProcessError:
except CoreCommandError:
status = -1
if status == 0 and result[:3] == '2.4':