From 7b24230437a27779bafa0828e73ab595c5aeb202 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Tue, 10 Jul 2012 17:06:45 -0700 Subject: Fixes 1012854 by implementing file writing, adjusts other code to have user/group parsing in util instead of in stages.py, renames decomp_str to decomp_gzip since it is more meaningful when named that (as thats all it can decompress). --- cloudinit/stages.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'cloudinit/stages.py') diff --git a/cloudinit/stages.py b/cloudinit/stages.py index 3beeb36e..2f6a566c 100644 --- a/cloudinit/stages.py +++ b/cloudinit/stages.py @@ -133,18 +133,7 @@ class Init(object): if log_file: util.ensure_file(log_file) if perms: - perms_parted = perms.split(':', 1) - u = perms_parted[0] - if len(perms_parted) == 2: - g = perms_parted[1] - else: - g = '' - u = u.strip() - g = g.strip() - if u == "-1" or u.lower() == "none": - u = None - if g == "-1" or g.lower() == "none": - g = None + u, g = util.extract_usergroup(perms) try: util.chownbyname(log_file, u, g) except OSError: -- cgit v1.2.3