From f24cf7f71b1bd5d2a904c2ba39315db3549f9ee3 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 26 Jan 2018 10:18:07 +0100 Subject: [PATCH] vmtools: use standard imports: os.remove() The rest of the code uses os.remove() --- fdroidserver/vmtools.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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\',' +