summaryrefslogtreecommitdiff
path: root/cloudinit/CloudConfig/cc_resizefs.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/CloudConfig/cc_resizefs.py')
-rw-r--r--cloudinit/CloudConfig/cc_resizefs.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/cloudinit/CloudConfig/cc_resizefs.py b/cloudinit/CloudConfig/cc_resizefs.py
index 1fdf8647..1fd9f094 100644
--- a/cloudinit/CloudConfig/cc_resizefs.py
+++ b/cloudinit/CloudConfig/cc_resizefs.py
@@ -25,13 +25,13 @@ from cloudinit.CloudConfig import per_always
frequency = per_always
-def handle(_name,cfg,_cloud,log,args):
+def handle(_name, cfg, _cloud, log, args):
if len(args) != 0:
resize_root = False
if str(args[0]).lower() in [ 'true', '1', 'on', 'yes']:
resize_root = True
else:
- resize_root = util.get_cfg_option_bool(cfg,"resize_rootfs",True)
+ resize_root = util.get_cfg_option_bool(cfg, "resize_rootfs", True)
if not resize_root:
return
@@ -43,7 +43,7 @@ def handle(_name,cfg,_cloud,log,args):
try:
st_dev = os.stat("/").st_dev
- dev = os.makedev(os.major(st_dev),os.minor(st_dev))
+ dev = os.makedev(os.major(st_dev), os.minor(st_dev))
os.mknod(devpth, 0400 | stat.S_IFBLK, dev)
except:
if util.islxc():
@@ -54,7 +54,7 @@ def handle(_name,cfg,_cloud,log,args):
cmd = [ 'blkid', '-c', '/dev/null', '-sTYPE', '-ovalue', devpth ]
try:
- (fstype,_err) = util.subp(cmd)
+ (fstype, _err) = util.subp(cmd)
except subprocess.CalledProcessError as e:
log.warn("Failed to get filesystem type of maj=%s, min=%s via: %s" %
(os.major(st_dev), os.minor(st_dev), cmd))