From 94d9fd040f23703c47367f860b93d1bd1ae8150e Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Thu, 16 Jun 2016 14:43:39 +0200 Subject: [PATCH] qubes.vm.__init__ Add docstrings --- qubes/vm/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qubes/vm/__init__.py b/qubes/vm/__init__.py index 59e63e32..720a1a48 100644 --- a/qubes/vm/__init__.py +++ b/qubes/vm/__init__.py @@ -122,6 +122,7 @@ class Features(dict): _NO_DEFAULT = object() def check_with_template(self, feature, default=_NO_DEFAULT): + ''' Check if the vm's template has the specified feature. ''' if feature in self: return self[feature] @@ -376,10 +377,12 @@ class BaseVM(qubes.PropertyHolder): return True def has_firewall(self): + ''' Return `True` if there are some vm specific firewall rules set ''' return os.path.exists(os.path.join(self.dir_path, self.firewall_conf)) @staticmethod def get_firewall_defaults(): + ''' Returns the default firewall rules ''' return { 'rules': list(), 'allow': True, @@ -388,6 +391,7 @@ class BaseVM(qubes.PropertyHolder): 'allowYumProxy': False} def get_firewall_conf(self): + ''' Returns the firewall config dictionary ''' conf = self.get_firewall_defaults() try: