Skip to content

Commit 81f3765

Browse files
committed
chore(lint): fix pylint errors
1 parent b356581 commit 81f3765

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/tito/builder/submodule_aware_builder.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,12 @@ def create_tgz(self, git_root, prefix, commit, relative_dir, dest_tgz):
152152
timestamp = get_commit_timestamp(commit)
153153

154154
# Accommodate standalone projects with specfile in root of git repo:
155-
relative_git_dir = "%s" % relative_dir
155+
relative_git_dir = str(relative_dir)
156156
if relative_git_dir in ["/", "./"]:
157157
relative_git_dir = ""
158158

159159
basename = os.path.splitext(dest_tgz)[0]
160-
initial_tar = "%s.initial" % basename
160+
initial_tar = "{0}.initial".format(basename)
161161

162162
# We need to tar up the following:
163163
# 1. the current repo
@@ -166,11 +166,11 @@ def create_tgz(self, git_root, prefix, commit, relative_dir, dest_tgz):
166166
# 2. all of the submodules
167167
# then combine those into a single archive.
168168
for submodule_tar_file in self._submodule_archives(
169-
relative_git_dir, prefix, commit, initial_tar
169+
relative_git_dir, prefix, initial_tar
170170
):
171-
run_command("tar -Af %s %s" % (initial_tar, submodule_tar_file))
171+
run_command("tar -Af {0} {1}".format(initial_tar, submodule_tar_file))
172172

173-
fixed_tar = "%s.tar" % basename
173+
fixed_tar = "{0}.tar".format(basename)
174174
fixed_tar_fh = open(fixed_tar, "wb")
175175
try:
176176
tarfixer = TarFixer(
@@ -181,4 +181,4 @@ def create_tgz(self, git_root, prefix, commit, relative_dir, dest_tgz):
181181
fixed_tar_fh.close()
182182

183183
# It's a pity we can't use Python's gzip, but it doesn't offer an equivalent of -n
184-
return run_command("gzip -n -c < %s > %s" % (fixed_tar, dest_tgz))
184+
return run_command("gzip -n -c < {0} > {1}".format(fixed_tar, dest_tgz))

0 commit comments

Comments
 (0)