Skip to content

Commit

Permalink
Apply pylint suggestions to setup.py
Browse files Browse the repository at this point in the history
- don't ignore subproc return code (check=True)
- setuptools.command.egginfo.find_sources() has never had a return code,
  don't pass one
  • Loading branch information
holmanb committed Apr 10, 2022
1 parent 59a9a23 commit 2bb599b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,13 @@ def render_tmpl(template, mode=None):
VARIANT,
template,
fpath,
]
],
check=True,
)
else:
subprocess.run(
[sys.executable, "./tools/render-cloudcfg", template, fpath]
[sys.executable, "./tools/render-cloudcfg", template, fpath],
check=True,
)
if mode:
os.chmod(fpath, mode)
Expand Down Expand Up @@ -202,7 +204,7 @@ class MyEggInfo(egg_info):
"""This makes sure to not include the rendered files in SOURCES.txt."""

def find_sources(self):
ret = egg_info.find_sources(self)
egg_info.find_sources(self)
# update the self.filelist.
self.filelist.exclude_pattern(
RENDERED_TMPD_PREFIX + ".*", is_regex=True
Expand All @@ -216,7 +218,6 @@ def find_sources(self):
]
with open(mfname, "w") as fp:
fp.write("".join(files))
return ret


# TODO: Is there a better way to do this??
Expand Down

0 comments on commit 2bb599b

Please sign in to comment.