New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dump file with relative path #20
base: master
Are you sure you want to change the base?
Conversation
join current working path if the dump path is not absolute.
Hi caohong, Thanks for your contribution. I agree that this is an useful feature, but I can't merge it without tests. I would appreciate if you included them on this pull request. Juarez |
@caohong are thinking about adding tests? |
ok. I'll do it @leandromoreira |
@caohong ping? |
@leandromoreira , @jbochi If this has not been implemented yet can I implement the same with test cases in a new PR?? |
@KuldeepBorkar I think you can but I'd leave the decision to @mauricioabreu :) as he's the most active member rn. |
@KuldeepBorkar please, go ahead! |
@@ -181,6 +181,8 @@ def dump(self, filename): | |||
fileobj.write(self.dumps()) | |||
|
|||
def _create_sub_directories(self, filename): | |||
if (os.path.isabs(filename) == False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most style guides would prefer:
if (os.path.isabs(filename) == False): | |
if not os.path.isabs(filename): |
join current working path if the dump path is not absolute:
m3u8_obj.dump('path1/index.m3u8') instead of m3u8_obj.dump('c:/workingdir/path1/index.m3u8')