diff options
Diffstat (limited to 'cloudinit/CloudConfig/cc_resizefs.py')
-rw-r--r-- | cloudinit/CloudConfig/cc_resizefs.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cloudinit/CloudConfig/cc_resizefs.py b/cloudinit/CloudConfig/cc_resizefs.py index 6615636f..adec70be 100644 --- a/cloudinit/CloudConfig/cc_resizefs.py +++ b/cloudinit/CloudConfig/cc_resizefs.py @@ -15,9 +15,9 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. + import cloudinit.util as util import subprocess -import traceback import os import stat import tempfile @@ -25,7 +25,7 @@ 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']: @@ -41,9 +41,9 @@ def handle(name,cfg,cloud,log,args): os.close(fd) try: - st_dev=os.stat("/").st_dev - dev=os.makedev(os.major(st_dev),os.minor(st_dev)) - os.mknod(devpth, 0400 | stat.S_IFBLK, dev) + st_dev=os.stat("/").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(): log.debug("inside lxc, ignoring mknod failure in resizefs") @@ -53,7 +53,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)) @@ -74,7 +74,7 @@ def handle(name,cfg,cloud,log,args): return try: - (out,err) = util.subp(resize_cmd) + util.subp(resize_cmd) except subprocess.CalledProcessError as e: log.warn("Failed to resize filesystem (%s)" % resize_cmd) log.warn("output=%s\nerror=%s\n", e.output[0], e.output[1]) |