Skip to content

Commit

Permalink
Add null check condition in structure
Browse files Browse the repository at this point in the history
  • Loading branch information
bunseokbot committed Feb 19, 2021
1 parent bc1dd45 commit bd8b9b6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.

This file was deleted.

2 changes: 1 addition & 1 deletion engine/framework/tflite.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ def extract(self, stream):
interpreter.allocate_tensors()
tensors = [
{'name': tensor['name'], 'index': tensor['index']}
for tensor in interpreter.get_tensor_details()
for tensor in interpreter.get_tensor_details() if tensor['name']
]
return tensors
7 changes: 3 additions & 4 deletions engine/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@


class Robster(robster_pb2_grpc.RobsterServicer):
def _make_report(self, _id, apk):
def _make_report(self, apk):
report = {
'_id': _id,
'filehash': apk.sha256,
'_id': apk.sha256,
'models': apk.models,
'keywords': apk.keywords,
'methods': apk.methods,
Expand Down Expand Up @@ -79,7 +78,7 @@ def executeAnalysis(self, request, context):
for method in methods:
logger.debug(f"Asset: {method['method']} Type: {method['type']}")

report = self._make_report(_id=request.id, apk=apk)
report = self._make_report(apk=apk)
self._save_report(report)

del apk
Expand Down

0 comments on commit bd8b9b6

Please sign in to comment.