qubes.vm.__init__ Fix pylint warnings
This commit is contained in:
		
							parent
							
								
									f318871279
								
							
						
					
					
						commit
						77d54b55ad
					
				| @ -120,6 +120,7 @@ class Features(dict): | |||||||
|     # |     # | ||||||
| 
 | 
 | ||||||
|     _NO_DEFAULT = object() |     _NO_DEFAULT = object() | ||||||
|  | 
 | ||||||
|     def check_with_template(self, feature, default=_NO_DEFAULT): |     def check_with_template(self, feature, default=_NO_DEFAULT): | ||||||
|         if feature in self: |         if feature in self: | ||||||
|             return self[feature] |             return self[feature] | ||||||
| @ -200,7 +201,7 @@ class BaseVM(qubes.PropertyHolder): | |||||||
| 
 | 
 | ||||||
|             for node in self.xml.xpath('./properties/property'): |             for node in self.xml.xpath('./properties/property'): | ||||||
|                 name = node.get('name') |                 name = node.get('name') | ||||||
|                 if not name in all_names: |                 if name not in all_names: | ||||||
|                     raise TypeError( |                     raise TypeError( | ||||||
|                         'property {!r} not applicable to {!r}'.format( |                         'property {!r} not applicable to {!r}'.format( | ||||||
|                             name, self.__class__.__name__)) |                             name, self.__class__.__name__)) | ||||||
| @ -211,12 +212,10 @@ class BaseVM(qubes.PropertyHolder): | |||||||
|         if hasattr(self, 'name'): |         if hasattr(self, 'name'): | ||||||
|             self.init_log() |             self.init_log() | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
|     def init_log(self): |     def init_log(self): | ||||||
|         '''Initialise logger for this domain.''' |         '''Initialise logger for this domain.''' | ||||||
|         self.log = qubes.log.get_vm_logger(self.name) |         self.log = qubes.log.get_vm_logger(self.name) | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
|     def __xml__(self): |     def __xml__(self): | ||||||
|         element = lxml.etree.Element('domain') |         element = lxml.etree.Element('domain') | ||||||
|         element.set('id', 'domain-' + str(self.qid)) |         element.set('id', 'domain-' + str(self.qid)) | ||||||
| @ -492,7 +491,6 @@ class VMProperty(qubes.property): | |||||||
|         self.vmclass = vmclass |         self.vmclass = vmclass | ||||||
|         self.allow_none = allow_none |         self.allow_none = allow_none | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
|     def __set__(self, instance, value): |     def __set__(self, instance, value): | ||||||
|         if value is self.__class__.DEFAULT: |         if value is self.__class__.DEFAULT: | ||||||
|             self.__delete__(instance) |             self.__delete__(instance) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Bahtiar `kalkin-` Gadimov
						Bahtiar `kalkin-` Gadimov