summaryrefslogtreecommitdiffstats
path: root/git_taskrepo
diff options
context:
space:
mode:
authorBill Peck <bpeck@redhat.com>2015-05-07 16:12:24 -0400
committerBill Peck <bpeck@redhat.com>2015-05-07 16:12:24 -0400
commit8c8a36a4471727f71f0f4ef8d35a2cfb06e548c6 (patch)
treea49f90eeb7bf07ee2228ecd6a60c1c0058b85bec /git_taskrepo
parentf44364d9554fc048af26d0bdd72f67fc136bfd37 (diff)
downloadtaskrepo-8c8a36a4471727f71f0f4ef8d35a2cfb06e548c6.tar.gz
taskrepo-8c8a36a4471727f71f0f4ef8d35a2cfb06e548c6.tar.xz
taskrepo-8c8a36a4471727f71f0f4ef8d35a2cfb06e548c6.zip
Prevent repo root from being imported.
Diffstat (limited to 'git_taskrepo')
-rw-r--r--git_taskrepo/taskrepo.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/git_taskrepo/taskrepo.py b/git_taskrepo/taskrepo.py
index 130d297..8d94888 100644
--- a/git_taskrepo/taskrepo.py
+++ b/git_taskrepo/taskrepo.py
@@ -62,6 +62,8 @@ def _update_taskrepo(taskrepo, taskname, testinfo):
cur.execute("INSERT INTO %s VALUES (?,?)" % key, (taskid, value))
def update_taskrepo(repo, taskrepo, taskpath):
+ if taskpath == repo.working_tree_dir:
+ raise TRX_TestInfo('Can''t import repo root')
taskname = taskpath.split("%s/" % repo.working_tree_dir)[1]
if os.path.isfile(os.path.join(taskpath, "Makefile")):
os.system("make -ki -C %s testinfo.desc >/dev/null 2>&1" % taskpath)