Skip to content

Commit

Permalink
Refactor check for abs path
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricioabreu committed Aug 3, 2024
1 parent 36849c0 commit be770e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion m3u8/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,9 @@ def dump(self, filename):
fileobj.write(self.dumps())

def _create_sub_directories(self, filename):
if (os.path.isabs(filename) == False):
if not os.path.isabs(filename):
filename = os.path.join(os.getcwd(), filename)

basename = os.path.dirname(filename)
if basename:
os.makedirs(basename, exist_ok=True)
Expand Down

0 comments on commit be770e2

Please sign in to comment.