Example #1
0
 def configure(self):
     section_name = self.config_section or self.name
     print "Configuring backend  " + self.name
     import idli.config as cfg
     for (name,help) in self.config_names:
         cfg.set_config_value(section_name, name, self.args.__dict__[name], global_val=not self.args.local_only)
     cfg.set_config_value("project", "type", self.name, global_val=not self.args.local_only)
     if (not self.args.local_only):
         print "Wrote configuration to " + cfg.global_config_filename()
     else:
         print "Added local configuration to " + cfg.global_config_filename()
Example #2
0
 def wrapped_func(self, *args, **kwargs):
     try:
         return func(self, *args, **kwargs)
     except HttpRequestException as e:
         if (e.status_code == 401):
             raise idli.IdliException(
                 "Authentication failed.\n\nCheck your idli configuration. The most likely cause is incorrect values for 'user' or 'password' variables in the [Bitbucket] section of the configuration files:\n    "
                 + cfg.local_config_filename() + "\n    " +
                 cfg.global_config_filename() +
                 ".\n\nMake sure you check both files - the values in " +
                 cfg.local_config_filename() +
                 " will override the values in " +
                 cfg.global_config_filename() + "." + "\n\n" + str(e))
         if (e.status_code == 404):
             self.validate()
         raise e
Example #3
0
 def configure(self):
     section_name = self.config_section or self.name
     print "Configuring backend  " + self.name
     import idli.config as cfg
     for (name, help) in self.config_names:
         cfg.set_config_value(section_name,
                              name,
                              self.args.__dict__[name],
                              global_val=not self.args.local_only)
     cfg.set_config_value("project",
                          "type",
                          self.name,
                          global_val=not self.args.local_only)
     if (not self.args.local_only):
         print "Wrote configuration to " + cfg.global_config_filename()
     else:
         print "Added local configuration to " + cfg.global_config_filename(
         )
Example #4
0
 def wrapped_func(self, *args, **kwargs):
     try:
         return func(self, *args, **kwargs)
     except HttpRequestException as e:
         if (e.status_code == 401):
             raise idli.IdliException("Authentication failed.\n\nCheck your idli configuration. The most likely cause is incorrect values for 'user' or 'password' variables in the [Bitbucket] section of the configuration files:\n    " + cfg.local_config_filename() + "\n    " + cfg.global_config_filename() + ".\n\nMake sure you check both files - the values in " + cfg.local_config_filename() + " will override the values in " + cfg.global_config_filename() + "." + "\n\n" + str(e))
         if (e.status_code == 404):
             self.validate()
         raise e