Really block 'updateable' flag change
This commit is contained in:
		
							parent
							
								
									1f5c03da3f
								
							
						
					
					
						commit
						97393c54a5
					
				| @ -306,14 +306,17 @@ class QubesVm(object): | |||||||
|         else: |         else: | ||||||
|             return False |             return False | ||||||
| 
 | 
 | ||||||
|  |     def set_updateable(self): | ||||||
|  |         if self.is_updateable(): | ||||||
|  |             return | ||||||
|  | 
 | ||||||
|  |         raise QubesException ("Change 'updateable' flag is not supported. Please use qvm-create.") | ||||||
| 
 | 
 | ||||||
|     def set_nonupdateable(self): |     def set_nonupdateable(self): | ||||||
|         if not self.is_updateable(): |         if not self.is_updateable(): | ||||||
|             return |             return | ||||||
| 
 | 
 | ||||||
|         assert not self.is_running() |         raise QubesException ("Change 'updateable' flag is not supported. Please use qvm-create.") | ||||||
|         # We can always downgrade a VM to non-updateable... |  | ||||||
|         self.updateable = False |  | ||||||
| 
 | 
 | ||||||
|     def is_template(self): |     def is_template(self): | ||||||
|         return isinstance(self, QubesTemplateVm) |         return isinstance(self, QubesTemplateVm) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Marek Marczykowski
						Marek Marczykowski