From ec9550c7cc06d45ee62f99801193a1553693c40c Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Thu, 16 Jun 2016 14:44:56 +0200 Subject: [PATCH] qubes.vm.__init__ Remove debug xml file creation --- qubes/vm/__init__.py | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/qubes/vm/__init__.py b/qubes/vm/__init__.py index 720a1a48..6653c96a 100644 --- a/qubes/vm/__init__.py +++ b/qubes/vm/__init__.py @@ -261,41 +261,20 @@ class BaseVM(qubes.PropertyHolder): return '<{} object at {:#x} {}>'.format( self.__class__.__name__, id(self), ' '.join(proprepr)) - # # xml serialising methods # - def create_config_file(self, file_path=None, prepare_dvm=False): + def create_config_file(self, prepare_dvm=False): '''Create libvirt's XML domain config file - :param str file_path: Path to file to create \ - (default: :py:attr:`qubes.vm.qubesvm.QubesVM.conf_file`) :param bool prepare_dvm: If we are in the process of preparing \ DisposableVM ''' - - if file_path is None: - file_path = self.conf_file - domain_config = self.app.env.get_template('libvirt/xen.xml').render( vm=self, prepare_dvm=prepare_dvm) - - # FIXME: This is only for debugging purposes - old_umask = os.umask(002) - try: - conf_appvm = open(file_path, "w") - conf_appvm.write(domain_config) - conf_appvm.close() - except: # pylint: disable=bare-except - # Ignore errors - pass - finally: - os.umask(old_umask) - return domain_config - # # firewall # TODO rewrite it, have node under