summaryrefslogtreecommitdiffstats
path: root/test/pacman/util.py
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2015-10-17 02:28:29 +0200
committerAllan McRae <allan@archlinux.org>2015-10-18 02:59:23 +0200
commit4ceb1c5bf91dea2453d9b888138c40e4f97d408d (patch)
treecf0d661dce4c54bdd1e096d91026db6e8e46718b /test/pacman/util.py
parent60ebee7a6e1984f14ea3f88159c28fa9b99d7f5c (diff)
downloadpacman-4ceb1c5bf91dea2453d9b888138c40e4f97d408d.tar.gz
pacman-4ceb1c5bf91dea2453d9b888138c40e4f97d408d.tar.xz
util.py: return the created path
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test/pacman/util.py')
-rw-r--r--test/pacman/util.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/pacman/util.py b/test/pacman/util.py
index aa9c63f7..e2acc52f 100644
--- a/test/pacman/util.py
+++ b/test/pacman/util.py
@@ -84,7 +84,7 @@ def mkfile(base, name, data=""):
if info["isdir"]:
if not os.path.isdir(path):
os.makedirs(path, 0o755)
- return
+ return path
dir_path = os.path.dirname(path)
if dir_path and not os.path.isdir(dir_path):
@@ -98,6 +98,8 @@ def mkfile(base, name, data=""):
if info["perms"]:
os.chmod(path, info["perms"])
+ return path
+
def writedata(filename, data):
if isinstance(data, list):
data = "\n".join(data)