From 2eaf65a1e13b2a76e107b9c5357c00565465d861 Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Thu, 25 Feb 2016 08:18:12 +0800 Subject: [PATCH] Import module rather than funciton in the set_configs.py file TrivialFix Change-Id: I352ef1176407edf093667644ce6adbd48eb63865 --- docker/base/set_configs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/base/set_configs.py b/docker/base/set_configs.py index d2f1a56435..8b94518af4 100644 --- a/docker/base/set_configs.py +++ b/docker/base/set_configs.py @@ -16,7 +16,7 @@ import contextlib import json import logging import os -from pwd import getpwnam +import pwd import shutil import sys @@ -182,7 +182,7 @@ def set_permissions(data): # Check for user and group id in the environment. try: - user = getpwnam(owner) + user = pwd.getpwnam(owner) except KeyError: LOG.error("The specified user does not exist: %s", owner) sys.exit(1)