PCA - Event handler now throws GitRepositorySynchronizationException if 
APPLICATION_PATH is null


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/a651a783
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/a651a783
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/a651a783

Branch: refs/heads/master
Commit: a651a783f29f60b0da650eba7542cde369fca90d
Parents: c0cf0d9
Author: Chamila de Alwis <[email protected]>
Authored: Mon May 18 23:21:07 2015 +0530
Committer: Chamila de Alwis <[email protected]>
Committed: Mon May 18 23:21:07 2015 +0530

----------------------------------------------------------------------
 .../cartridge.agent/cartridge.agent/modules/event/eventhandler.py | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/a651a783/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
 
b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
index 5ce9b4a..1061fbd 100644
--- 
a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
+++ 
b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/event/eventhandler.py
@@ -88,6 +88,9 @@ class EventHandler:
 
             self.__log.info("Executing git checkout")
 
+            if local_repo_path is None:
+                raise GitRepositorySynchronizationException("Repository path 
is empty. Cannot perform Git operations.")
+
             # create repo object
             local_repo_path = self.get_repo_path_for_tenant(tenant_id, 
local_repo_path, is_multitenant)
             repo_info = Repository(repo_url, repo_username, repo_password, 
local_repo_path, tenant_id, commit_enabled)

Reply via email to