Skip to content
Snippets Groups Projects
Commit 4df6f889 authored by Seblu's avatar Seblu
Browse files

fix bad image file building

parent a22b222e
No related branches found
No related tags found
No related merge requests found
......@@ -261,17 +261,17 @@ class SourceImage(Image):
tarball.addfile(ti)
# adding each file
for fi in os.listdir(directory):
fp = os.path.join(directory, fi)
# check name
if not re.match("\d+-.*\.py$", fi):
debug("%s skipped: invalid name" % fi)
continue
# adding file
ti = tarball.gettarinfo(os.path.join(directory, fi),
arcname=os.path.join(basedirectory, fi))
ti = tarball.gettarinfo(fp, arcname=os.path.join(basedirectory, fi))
ti.mode = 0755
ti.uid = ti.gid = 0
ti.uname = ti.gname = "root"
tarball.addfile(ti)
tarball.addfile(ti, open(fp, "rb"))
arrow("%s added" % fi)
arrowlevel(-1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment