summaryrefslogtreecommitdiff
path: root/vmdebootstrap
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2015-12-31 13:05:19 +0000
committerNeil Williams <codehelp@debian.org>2015-12-31 13:05:19 +0000
commitd564ff00d5a7dd7413eaafb026a8df8838e50536 (patch)
tree3c14b8f4152b9deabe14d453218c87d00d0ad7a2 /vmdebootstrap
parent78f8e6657ba4fef04919dad889257d7f341c035b (diff)
downloadvmdebootstrap-d564ff00d5a7dd7413eaafb026a8df8838e50536.tar.gz
Fixup pylint issues
Diffstat (limited to 'vmdebootstrap')
-rw-r--r--vmdebootstrap/filesystem.py4
-rw-r--r--vmdebootstrap/network.py13
2 files changed, 9 insertions, 8 deletions
diff --git a/vmdebootstrap/filesystem.py b/vmdebootstrap/filesystem.py
index ad7575c..c38534e 100644
--- a/vmdebootstrap/filesystem.py
+++ b/vmdebootstrap/filesystem.py
@@ -70,6 +70,7 @@ class Filesystem(Base):
runcmd(["chown", "-R", self.settings["owner"], filename])
def update_initramfs(self):
+ rootdir = self.devices['rootdir']
if not rootdir:
raise cliapp.AppException("rootdir not set")
if not os.path.exists(
@@ -78,7 +79,6 @@ class Filesystem(Base):
return
if not self.settings['no-update-initramfs']:
return
- rootdir = self.devices['rootdir']
cmd = os.path.join('usr', 'sbin', 'update-initramfs')
if os.path.exists(os.path.join(str(rootdir), cmd)):
self.message("Updating the initramfs")
@@ -299,4 +299,4 @@ class Filesystem(Base):
tmpname = self.settings['image'] + '.raw'
os.rename(self.settings['image'], tmpname)
runcmd(['qemu-img', 'convert', '-O', 'qcow2',
- tmpname, self.settings['image']])
+ tmpname, self.settings['image']])
diff --git a/vmdebootstrap/network.py b/vmdebootstrap/network.py
index 740dede..115b5c3 100644
--- a/vmdebootstrap/network.py
+++ b/vmdebootstrap/network.py
@@ -4,25 +4,25 @@
# -*- coding: utf-8 -*-
#
# network.py
-#
+#
# Copyright 2015 Neil Williams <codehelp@debian.org>
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
-#
-#
+#
+#
import os
from vmdebootstrap.base import (
@@ -41,6 +41,7 @@ class Networking(Base):
self.message('Setting up networking')
ifc_d = os.path.join(rootdir, 'etc', 'network', 'interfaces.d')
ifc_file = os.path.join(rootdir, 'etc', 'network', 'interfaces')
+ ethpath = os.path.join(ifc_d, 'setup')
with open(ifc_file, 'w') as netfile:
netfile.write(line)
if not os.path.exists(ifc_d):