1. Yann Malet
  2. cherokee-admin-api

Commits

Yann Malet  committed b05b8f5

Fix a bug in the creation of a source

  • Participants
  • Parent commits f7442b3
  • Branches default

Comments (0)

Files changed (1)

File cherokee_admin_api/admin.py

View file
         return Admin._create_vserver(self.config, nick, document_root, **kwargs)
         
     def create_source(self, nick, host, type, **kwargs):
-        return Admin._create_source(self.config, nick, host, **kwargs)
+        return Admin._create_source(self.config, nick, host,
+                                    type, **kwargs)
         
     def create_rule(self, vserver_path, **kwargs):
         new_rule_path = self.config.get_next_entry_prefix(pre=vserver_path+"!rule")
         config.save()
     
     @classmethod 
-    def _create_source(cls, config, nick, host, **kwargs):
+    def _create_source(cls, config, nick, host,
+                       type, **kwargs):
         """
         Create a source
         """
         new_source_path = config.get_next_entry_prefix(pre="source")
         config[new_source_path + "!nick"] = nick
         config[new_source_path + "!host"] = host
+        config[new_source_path + "!type"] = type
         for k in kwargs.keys():
             config[new_source_path + "!%s" %k] = kwargs[k]   
         config.normalize(pre="source", step=STEP_SOURCE)