aboutsummaryrefslogtreecommitdiff
path: root/src/ee/tools/__init__.py
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-03-16 22:17:33 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2019-03-23 07:30:03 +0100
commit1fe278b37b4031a42f8e27ee4f3251b474efcb16 (patch)
treee89454d2f868b491ba27792cafb1db8266ff1bb0 /src/ee/tools/__init__.py
parent8e642991d557bd902b749ddd84e41d65c48f79cf (diff)
downloadee-python-1fe278b37b4031a42f8e27ee4f3251b474efcb16.tar.gz
ee-python-1fe278b37b4031a42f8e27ee4f3251b474efcb16.tar.bz2
ee-python-1fe278b37b4031a42f8e27ee4f3251b474efcb16.tar.xz
ee-python-1fe278b37b4031a42f8e27ee4f3251b474efcb16.zip
Starting some code around creating reports.
Diffstat (limited to 'src/ee/tools/__init__.py')
-rw-r--r--src/ee/tools/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ee/tools/__init__.py b/src/ee/tools/__init__.py
index 12916ca..b0c1051 100644
--- a/src/ee/tools/__init__.py
+++ b/src/ee/tools/__init__.py
@@ -1,4 +1,6 @@
import os.path
+from pathlib import Path
+from typing import Union
from colors import color
@@ -13,8 +15,8 @@ def _mkdir_and_open(path):
return open(path, "w")
-def mk_parents(path: str):
- dirname = os.path.diŒrname(path)
+def mk_parents(path: Union[str, Path]):
+ dirname = os.path.dirname(str(path))
if len(dirname) == 0:
return