Avoid duplicate entries in debug logs

pull/3/head v0.3.5
Christophe Mehay 8 years ago
parent 248ce38c88
commit 5c2003a0f2

@ -60,6 +60,7 @@ class Config(object):
self.log = Logs().log
self._args = args
self._links = None
self._command = None
self._config_file = conf
if not os.path.isfile(self._config_file):
self.log.critical('Entrypoint config file does not provided')
@ -75,11 +76,14 @@ class Config(object):
@property
def command(self):
"Main command to run."
if self._command:
return self._command
cmd = self._args[0] if self._args else ''
for key in ['command', 'cmd']:
if key in self._config:
cmd = self._config[key]
return Command(cmd, self, self._args)
self._command = Command(cmd, self, self._args)
return self._command
@property
def subcommands(self):

@ -5,7 +5,7 @@ from setuptools import setup
# Thanks Sam and Max
__version__ = '0.3.4'
__version__ = '0.3.5'
if __name__ == '__main__':
setup(

Loading…
Cancel
Save