From: Hans-Christoph Steiner Date: Fri, 26 Jan 2018 09:18:07 +0000 (+0100) Subject: vmtools: use standard imports: os.remove() X-Git-Tag: 1.0.1~28^2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=f24cf7f71b1bd5d2a904c2ba39315db3549f9ee3;p=fdroidserver.git vmtools: use standard imports: os.remove() The rest of the code uses os.remove() --- diff --git a/fdroidserver/vmtools.py b/fdroidserver/vmtools.py index f6aa0a8b..568da58a 100644 --- a/fdroidserver/vmtools.py +++ b/fdroidserver/vmtools.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from os import remove as rmfile from os.path import isdir, isfile, basename, abspath, expanduser import os import math @@ -376,11 +375,11 @@ class LibvirtBuildVm(FDroidBuildVm): if storagePool: if isfile('metadata.json'): - rmfile('metadata.json') + os.remove('metadata.json') if isfile('Vagrantfile'): - rmfile('Vagrantfile') + os.remove('Vagrantfile') if isfile('box.img'): - rmfile('box.img') + os.remove('box.img') logger.debug('preparing box.img for box %s', output) vol = storagePool.storageVolLookupByName(self.srvname + '.img') @@ -430,9 +429,9 @@ class LibvirtBuildVm(FDroidBuildVm): if not keep_box_file: logger.debug('box packaging complete, removing temporary files.') - rmfile('metadata.json') - rmfile('Vagrantfile') - rmfile('box.img') + os.remove('metadata.json') + os.remove('Vagrantfile') + os.remove('box.img') else: logger.warn('could not connect to storage-pool \'default\',' +