From a13dadc48c64db6e3590cf466b56bb590969cb27 Mon Sep 17 00:00:00 2001 From: Marek Labonarski Date: Mon, 4 Mar 2019 15:23:54 +0100 Subject: [PATCH 1/2] Fix for relative path --- yawrap/_yawrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yawrap/_yawrap.py b/yawrap/_yawrap.py index a91b620..a2a7623 100644 --- a/yawrap/_yawrap.py +++ b/yawrap/_yawrap.py @@ -43,7 +43,7 @@ class Yawrap(Doc): self._target_file = target_file self.title = title self._parent = parent - self._target_dir = os.path.dirname(target_file) + self._target_dir = os.path.dirname(target_file) or os.getcwd() self._additional_resources = [] @contextmanager -- GitLab From c726eafb398b988020cac0a422724023b2d5c4ee Mon Sep 17 00:00:00 2001 From: Marek Labonarski Date: Tue, 5 Mar 2019 08:32:29 +0100 Subject: [PATCH 2/2] Fix creating path for output file --- yawrap/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yawrap/utils.py b/yawrap/utils.py index c1f6735..dfb6f4c 100644 --- a/yawrap/utils.py +++ b/yawrap/utils.py @@ -12,7 +12,7 @@ from .six import str_types def make_place(target_file): - dir_ = os.path.dirname(target_file) + dir_ = os.path.dirname(target_file) or os.getcwd() if not os.path.isdir(dir_): assert not os.path.isfile(dir_) os.makedirs(dir_) -- GitLab