Skip to content

Commit

Permalink
Fix previous commit (for EI-CoreBioinformatics#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucventurini committed Mar 30, 2020
1 parent 8bf584b commit ffb13e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 8 additions & 2 deletions Mikado/parsers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,15 @@ def __getstate__(self):
state.update(self.__dict__)
state["position"] = position
if hasattr(self._handle, "filename"):
state["_handle"] = self._handle.filename
_handle = self._handle.filename
if isinstance(_handle, bytes):
_handle = _handle.decode()
state["_handle"] = _handle
elif hasattr(self._handle, "name"):
state["_handle"] = self._handle.name
_handle = self._handle.name
if isinstance(_handle, bytes):
_handle = _handle.decode()
state["_handle"] = _handle
else:
raise TypeError("Unknown handle: {}".format(self._handle))
return state
Expand Down
3 changes: 1 addition & 2 deletions Mikado/scales/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,6 @@ def parse_prediction(args, index, queue_logger):

queue_logger.info("Starting to parse the prediction")
if args.processes > 1:
# print(mp.get_start_method())
log_queue = args.log_queue
dargs = dict()
doself = False
Expand All @@ -624,7 +623,7 @@ def parse_prediction(args, index, queue_logger):
assert os.path.exists(dump_dbhandle.name), dump_dbhandle.name
assert os.stat(dump_dbhandle.name).st_size > 0, dump_dbhandle.name
procs = [Assigners(index, nargs, queue, returnqueue, log_queue, counter, dump_dbhandle.name)
for counter in range(1, args.processes)]
for counter in range(1, args.processes)]
[proc.start() for proc in procs]
final_proc = FinalAssigner(index, nargs, returnqueue, log_queue=log_queue)
final_proc.start()
Expand Down

0 comments on commit ffb13e7

Please sign in to comment.