Browse Source

Provide fake CPUs count and total memory in offline mode

Marek Marczykowski-Górecki 8 years ago
parent
commit
2ff6aa456e
1 changed files with 5 additions and 0 deletions
  1. 5 0
      qubes/app.py

+ 5 - 0
qubes/app.py

@@ -248,6 +248,8 @@ class QubesHost(object):
     def memory_total(self):
         '''Total memory, in kbytes'''
 
+        if self.app.vmm.offline_mode:
+            return 2**64-1
         self._fetch()
         return self._total_mem
 
@@ -256,6 +258,9 @@ class QubesHost(object):
     def no_cpus(self):
         '''Number of CPUs'''
 
+        if self.app.vmm.offline_mode:
+            return 42
+
         self._fetch()
         return self._no_cpus