Skip to content

Commit

Permalink
Merge pull request #6 from Sefaria/edemirci-aai-patch-1
Browse files Browse the repository at this point in the history
fix(part_res): handle input as list and string correctly
  • Loading branch information
edemirci-aai authored May 22, 2024
2 parents 0e6bd29 + 3482d25 commit 04a74a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions VirtualHavruta/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ def create_logger(f='virtual-havruta.log', name='virtual-havruta', mb=1*1024*102
return logger

def part_res(input_res, sep=''):
if isinstance(input_res, list):
input_res = ' '.join(input_res)
if sep:
return input_res.partition(sep)[2].strip()
return input_res.strip()

0 comments on commit 04a74a2

Please sign in to comment.