diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2022-07-12 10:08:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-12 10:08:37 +0200 |
commit | 89b8d33d05062869f61c7086e15b4c68b78af9c0 (patch) | |
tree | d3c7f76fee257aa9d0faeb07d70ceedda51c07f2 | |
parent | 25f198aa911ee4a99851a5b3f42465c798f04edd (diff) | |
download | spack-89b8d33d05062869f61c7086e15b4c68b78af9c0.tar.gz spack-89b8d33d05062869f61c7086e15b4c68b78af9c0.tar.bz2 spack-89b8d33d05062869f61c7086e15b4c68b78af9c0.tar.xz spack-89b8d33d05062869f61c7086e15b4c68b78af9c0.zip |
Remove os.getcwd from function signature (#31480)
fixes #29730
This is also wrong since it binds the directory at the time
of module import, rather than the one at the time of function
call.
-rw-r--r-- | lib/spack/spack/report.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/spack/spack/report.py b/lib/spack/spack/report.py index b67f2e71cc..8e50ebece6 100644 --- a/lib/spack/spack/report.py +++ b/lib/spack/spack/report.py @@ -2,7 +2,6 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - """Tools to produce reports of spec installations""" import codecs import collections @@ -281,9 +280,9 @@ class collect_info(object): .format(self.format_name)) self.report_writer = report_writers[self.format_name](args) - def __call__(self, type, dir=os.getcwd()): + def __call__(self, type, dir=None): self.type = type - self.dir = dir + self.dir = dir or os.getcwd() return self def concretization_report(self, msg): |