Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get(self, profile_name):
abspath = os.path.abspath(profile_name)
if os.path.isdir(abspath):
self._list_dir(abspath)
else:
try:
s = Stats(profile_name)
except:
raise RuntimeError('Could not read %s.' % profile_name)
self.render(
'viz.html', profile_name=profile_name,
table_rows=table_rows(s), callees=json_stats(s))