diff options
Diffstat (limited to 'python/collaboration')
| -rw-r--r-- | python/collaboration/examples/multitool.py | 2 | ||||
| -rw-r--r-- | python/collaboration/examples/upload_everything.py | 2 | ||||
| -rw-r--r-- | python/collaboration/merge.py | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/python/collaboration/examples/multitool.py b/python/collaboration/examples/multitool.py index c1749773..eeb1e140 100644 --- a/python/collaboration/examples/multitool.py +++ b/python/collaboration/examples/multitool.py @@ -32,7 +32,7 @@ def print_remote_info(remote: Remote, extended=False): try: if not remote.is_connected: remote.connect() - except: + except Exception: pass if extended: print(f"Name: {remote.name}\n" diff --git a/python/collaboration/examples/upload_everything.py b/python/collaboration/examples/upload_everything.py index b6d638e7..83ab2a3d 100644 --- a/python/collaboration/examples/upload_everything.py +++ b/python/collaboration/examples/upload_everything.py @@ -107,7 +107,7 @@ def main(): with TqdmProgress(desc="", leave=False) as t: with binaryninja.load(file, update_analysis=False, progress_func=lambda cur, max: t.progress(cur, max)) as bv: project.upload_new_file(bv.file, folder, progress=lambda cur, max: t.progress(cur, max)) - except: + except Exception: tqdm.write(traceback.format_exc()) diff --git a/python/collaboration/merge.py b/python/collaboration/merge.py index 1df16c57..6a2becda 100644 --- a/python/collaboration/merge.py +++ b/python/collaboration/merge.py @@ -226,7 +226,7 @@ class ConflictHandler: for i in range(count): py_conflicts[core.pyNativeStr(keys[i])] = MergeConflict(handle=conflicts[i]) return self.handle(py_conflicts) - except: + except Exception: traceback.print_exc(file=sys.stderr) return False @@ -270,7 +270,7 @@ class ConflictSplitter: def _get_name(self, ctxt: ctypes.c_void_p) -> ctypes.c_char_p: try: return core.BNAllocString(core.cstr(self.name)) - except: + except Exception: # Not sure why your get_name() would throw but let's handle it anyway traceback.print_exc(file=sys.stderr) return core.BNAllocString(core.cstr(type(self).__name__)) @@ -278,20 +278,20 @@ class ConflictSplitter: def _reset(self, ctxt: ctypes.c_void_p): try: self.reset() - except: + except Exception: traceback.print_exc(file=sys.stderr) def _finished(self, ctxt: ctypes.c_void_p): try: self.finished() - except: + except Exception: traceback.print_exc(file=sys.stderr) def _can_split(self, ctxt: ctypes.c_void_p, key: ctypes.c_char_p, conflict: core.BNAnalysisMergeConflictHandle) -> bool: try: py_conflict = MergeConflict(handle=conflict) return self.can_split(core.pyNativeStr(key), py_conflict) - except: + except Exception: traceback.print_exc(file=sys.stderr) return False @@ -328,7 +328,7 @@ class ConflictSplitter: new_conflicts[0][i] = self._split_conflicts[-1]._handle return True - except: + except Exception: traceback.print_exc(file=sys.stderr) return False |
