summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/stage.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py
index 5dc2a8ddfc..3410e8b63e 100644
--- a/lib/spack/spack/stage.py
+++ b/lib/spack/spack/stage.py
@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import grp
import os
import stat
import sys
@@ -56,8 +55,8 @@ def _first_accessible_path(paths):
if not os.path.exists(prefix):
break
parent = os.path.dirname(prefix)
- group = grp.getgrgid(os.stat(parent).st_gid)[0]
- mkdirp(path, group=group, default_perms='parents')
+ gid = os.stat(parent).st_gid
+ mkdirp(path, group=gid, default_perms='parents')
if can_access(path):
return path