Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #258 from helxplatform/helx_326_stack_trace_stoppi…
Browse files Browse the repository at this point in the history
…ng_instance

stack trace from wrongly used traceback print function when stopping instances.
  • Loading branch information
muralikarthikk authored May 19, 2023
2 parents c8cdddc + d1331ad commit 98b901d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tests/test_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __test_context ():
successful_count = successful_count + 1
except Exception as e:
logger.debug (f"App {app_id} failed. {e}")
traceback.print_exc ()
traceback.print_exc()
failed.append (app_id)
failed_count = failed_count + 1
logger.info (f"{product.upper()} had {successful_count} successful apps and {failed_count} failed apps.")
Expand Down
2 changes: 1 addition & 1 deletion tycho/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION = "1.13.0"
VERSION = "1.13.1"

2 changes: 1 addition & 1 deletion tycho/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def validate(self, request, component):
jsonschema.validate(request, to_validate)
except jsonschema.exceptions.ValidationError as error:
logger.error(f"ERROR: {str(error)}")
traceback.print_exc (error)
traceback.print_exc()

def create_response(self, result=None, status='success', message='', exception=None):
""" Create a response. Handle formatting and modifiation of status for exceptions. """
Expand Down
4 changes: 2 additions & 2 deletions tycho/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ def validate (self, request, component):
jsonschema.validate(request.json, to_validate)
except jsonschema.exceptions.ValidationError as error:
app.logger.error (f"ERROR: {str(error)}")
traceback.print_exc (error)
traceback.print_exc()
abort(Response(str(error), 400))

def create_response (self, result=None, status='success', message='', exception=None):
""" Create a response. Handle formatting and modifiation of status for exceptions. """
if exception:
traceback.print_exc ()
traceback.print_exc()
status='error'
exc_type, exc_value, exc_traceback = sys.exc_info()
message = f"{exception.args[0]} {''.join (exception.args[1])}" \
Expand Down
4 changes: 2 additions & 2 deletions tycho/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def down (self, names):
else:
print (json.dumps (response, indent=2))
except Exception as e:
traceback.print_exc (e)
traceback.print_exc()

def patch(self, mod_items):
"""
Expand Down Expand Up @@ -424,7 +424,7 @@ def get_client (self, name="tycho-api", namespace="default", default_url="http:/
url = f"http://{ip}:{port}"
except ValueError as e:
logger.error ("unable to get minikube ip address")
traceback.print_exc (e)
traceback.print_exc()
print(f"URL: {url}")
except Exception as e:
url = default_url
Expand Down
2 changes: 1 addition & 1 deletion tycho/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, config="conf/tycho.yaml"):
self.conf['tycho']['compute']['platform']['kube']['ip'] = ip
except ValueError as e:
logger.error ("unable to get minikube ip address")
traceback.print_exc (e)
traceback.print_exc()

def __setitem__(self, key, val):
self.conf.__setitem__(key, val)
Expand Down
4 changes: 2 additions & 2 deletions tycho/kube.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def start (self, system, namespace="default"):
break
break
except Exception as e:
traceback.print_exc (e)
traceback.print_exc()
exc_type, exc_value, exc_traceback = sys.exc_info()
text = traceback.format_exception(
exc_type, exc_value, exc_traceback)
Expand Down Expand Up @@ -367,7 +367,7 @@ def delete (self, name, namespace="default"):
namespace=namespace)

except ApiException as e:
traceback.print_exc (e)
traceback.print_exc()
exc_type, exc_value, exc_traceback = sys.exc_info()
text = traceback.format_exception(
exc_type, exc_value, exc_traceback)
Expand Down

0 comments on commit 98b901d

Please sign in to comment.