Skip to content

Commit

Permalink
Axis2 touch ups
Browse files Browse the repository at this point in the history
* src/platform/axis2/auxiliary/info_dump.py
  -- Removed unnecessary import
* src/platform/axis2/deployers/service_upload.py
  -- Added output in the event that Axis2 returns an error on
  deployment
  • Loading branch information
hatRiot committed Jul 10, 2014
1 parent 79bd0b2 commit 73192a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/platform/axis2/auxiliary/info_dump.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from src.platform.axis2.authenticate import checkAuth
from auxiliary import Auxiliary
from log import LOG
from re import findall
Expand Down
8 changes: 7 additions & 1 deletion src/platform/axis2/deployers/service_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from src.platform.axis2.authenticate import checkAuth
from src.module.deploy_utils import parse_war_path
from os.path import abspath
from re import findall
from log import LOG
import utility

Expand Down Expand Up @@ -32,7 +33,12 @@ def deploy(fingerengine, fingerprint):

response = utility.requests_post(base + uri, files=payload, cookies=cookie)
if response.status_code is 200:
utility.Msg("{0} deployed successfully to /axis2/services/{1}".
if 'The following error occurred' in response.content:
error = findall("occurred <br/> (.*?)</font>", response.content)
utility.Msg("Failed to deploy {0}. Reason: {1}".format(file_name,
error[0]), LOG.ERROR)
else:
utility.Msg("{0} deployed successfully to /axis2/services/{1}".
format(file_name, parse_war_path(file_path)),
LOG.SUCCESS)
else:
Expand Down

0 comments on commit 73192a9

Please sign in to comment.