From 1498612a2f732c83359eb81b1446084e86d03d54 Mon Sep 17 00:00:00 2001
From: Giorgos Korfiatis <gkorf@grnet.gr>
Date: Mon, 19 Oct 2015 19:26:41 +0300
Subject: [PATCH] Use realpath of callback

---
 agkyra/cli.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/agkyra/cli.py b/agkyra/cli.py
index 4047567..4be397d 100644
--- a/agkyra/cli.py
+++ b/agkyra/cli.py
@@ -177,10 +177,11 @@ class AgkyraCLI(cmd.Cmd):
     helper = protocol.SessionHelper()
 
     def __init__(self, *args, **kwargs):
-        self.callback = kwargs.pop('callback', sys.argv[0])
+        self.callback = kwargs.pop('callback', os.path.realpath(sys.argv[0]))
         self.args = kwargs.pop('parsed_args', None)
         AGKYRA_LOGGER.setLevel(logging.DEBUG
                                if self.args.debug else logging.INFO)
+        LOGGER.debug("Callback is %s" % self.callback)
         cmd.Cmd.__init__(self, *args, **kwargs)
 
     @staticmethod
-- 
GitLab