Commit cb2aeda8 authored by Łukasz Nowak's avatar Łukasz Nowak

Add some logging.

parent 5c293dba
...@@ -184,7 +184,11 @@ class Software(object): ...@@ -184,7 +184,11 @@ class Software(object):
func(path) func(path)
try: try:
if os.path.exists(self.software_path): if os.path.exists(self.software_path):
self.logger.info('Removing path %r' % self.software_path)
shutil.rmtree(self.software_path, onerror=retry) shutil.rmtree(self.software_path, onerror=retry)
else:
self.logger.info('Path %r does not exists, no need to remove.' %
self.software_path)
except IOError as error: except IOError as error:
error_string = "I/O error while removing software (%s): %s" % (self.url, error_string = "I/O error while removing software (%s): %s" % (self.url,
error) error)
......
...@@ -449,7 +449,9 @@ class Slapgrid(object): ...@@ -449,7 +449,9 @@ class Slapgrid(object):
software_release.building() software_release.building()
software.install() software.install()
elif state == 'destroyed': elif state == 'destroyed':
logger.info('Destroying %r...' % software_release_uri)
software.destroy() software.destroy()
logger.info('Destroyed %r.' % software_release_uri)
except (SystemExit, KeyboardInterrupt): except (SystemExit, KeyboardInterrupt):
exception = traceback.format_exc() exception = traceback.format_exc()
software_release.error(exception) software_release.error(exception)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment