Skip to content

Commit

Permalink
Simplify code in filesets
Browse files Browse the repository at this point in the history
  • Loading branch information
jordimas committed Aug 4, 2024
1 parent 1110ae8 commit 62a4669
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/builder/bazaarfileset.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@ def _has_filename(self):
"""Used to identify if the file contains a path (/ and then .)"""
filename = self.url.split("/")[-1]

if len(filename) > 0:
rslt = self.filename.find(".")
if rslt != -1:
return True

return False
return "." in filename

def do(self):
if self._has_filename():
Expand Down
2 changes: 1 addition & 1 deletion src/builder/compressedfileset.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def uncompress(filename, report_error, temp_dir):
cmd = "tar -Jxf {0} -C {1}".format(filename, temp_dir)
os.system(cmd)
else:
if report_error is True:
if report_error:
msg = "Unsupported file extension for filename: {0}"
logging.error(msg.format(filename))

Expand Down

0 comments on commit 62a4669

Please sign in to comment.