Skip to content

Commit

Permalink
feat: change init returns
Browse files Browse the repository at this point in the history
  • Loading branch information
cowan-macady committed Mar 21, 2023
1 parent 75bb9ea commit c2ce5fc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
5 changes: 3 additions & 2 deletions indykite_sdk/authorization/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import certifi
import grpc
import os
import indykite_sdk.utils.logger as logger
import sys
from indykite_sdk.authorization import helper
from indykite_sdk.indykite.authorization.v1beta1 import authorization_service_pb2_grpc as pb2

Expand Down Expand Up @@ -46,6 +46,7 @@ def __init__(self, local=False):
self.stub = pb2.AuthorizationAPIStub(channel=self.channel)

except Exception as exception:
return logger.logger_error(exception)
tb = sys.exception().__traceback__
raise exception(...).with_traceback(tb)
# Imported methods
from .is_authorized import is_authorized_token, is_authorized_digital_twin, is_authorized_property_filter
5 changes: 3 additions & 2 deletions indykite_sdk/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import certifi
import grpc
import os
import indykite_sdk.utils.logger as logger
import sys
from indykite_sdk.config import helper
from indykite_sdk.indykite.config.v1beta1 import config_management_api_pb2_grpc as config_pb2_grpc

Expand Down Expand Up @@ -47,7 +47,8 @@ def __init__(self, local=False):
self.credentials = credentials

except Exception as exception:
return logger.logger_error(exception)
tb = sys.exception().__traceback__
raise exception(...).with_traceback(tb)

# Imported methods
from .customer import get_customer_by_id, get_customer_by_name
Expand Down
5 changes: 3 additions & 2 deletions indykite_sdk/identity/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import certifi
import grpc
import os
import indykite_sdk.utils.logger as logger
import sys
from indykite_sdk.identity import helper
from indykite_sdk.indykite.identity.v1beta2 import identity_management_api_pb2_grpc as pb2_grpc

Expand Down Expand Up @@ -46,7 +46,8 @@ def __init__(self, local=False):
self.stub = pb2_grpc.IdentityManagementAPIStub(channel=self.channel)

except Exception as exception:
return logger.logger_error(exception)
tb = sys.exception().__traceback__
raise exception(...).with_traceback(tb)

# Imported methods
from .change_password import change_password_of_user, change_password
Expand Down
3 changes: 2 additions & 1 deletion indykite_sdk/ingest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def __init__(self, local=False):
self.channel = grpc.secure_channel(endpoint, composite_credentials)
self.stub = pb2_grpc.IngestAPIStub(channel=self.channel)
except Exception as exception:
return logger.logger_error(exception)
tb = sys.exception().__traceback__
raise exception(...).with_traceback(tb)

def generate_records_request(self, config_id, records):
"""Create iterator for record requests."""
Expand Down

0 comments on commit c2ce5fc

Please sign in to comment.