From 89b8d33d05062869f61c7086e15b4c68b78af9c0 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 12 Jul 2022 10:08:37 +0200 Subject: 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. --- lib/spack/spack/report.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib') 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): -- cgit v1.2.3-70-g09d2