Skip to content

Commit fe495e9

Browse files
committed
old python on buildkit
1 parent 2cb34dd commit fe495e9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/private/install.py.tpl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,11 @@ class NativeInstaller(object):
102102
logging.debug("SYMLINK %s <- %s %s %s %s", target, link_name, mode, user, group)
103103
os.symlink(target, link_name)
104104
if mode:
105-
logging.debug("CHMOD %s %s", mode, link_name)
106-
os.lchmod(link_name, int(mode, 8))
105+
if hasattr(os, "lchmod"):
106+
logging.debug("CHMOD %s %s", mode, link_name)
107+
os.lchmod(link_name, int(mode, 8))
108+
else:
109+
logging.debug("CHMOD-NOT AVAILABLE %s %s", mode, link_name)
107110
if user or group:
108111
# Ownership can only be changed by sufficiently
109112
# privileged users.

0 commit comments

Comments
 (0)