def load_controllers(self, app_path, controllers):
        found_controller, found_helper = (None, None)
        
        for controller_file in controllers:
            """Load controller"""
            try:
                found_controller = imp.find_module(controller_file % '%s_controller', app_path)
            except ImportError, e:
                self.logger.warning("Failed to find proper controller in %s" % controller_file, exc_info=True)
                continue
            else:
                controller_module = imp.load_module('%s_controller' % controller_file, *found_controller)
                self.logger.debug("Loaded controller from %s" % controller_file)
                for controller_class_name in dir(controller_module):
                    # test_name = '%sController' % ''.join([i.title() for i in controller_file.split('_')])
                    if not controller_class_name.endswith('Controller'):
                        continue
                        
                    controller_class = getattr(controller_module, controller_class_name)
                    
                    if controller_class != ActionController and issubclass(controller_class, ActionController):
                        controller_name = get_controller_name(controller_class)
                        if controller_name in self.controllers:
                            continue
                            
                        self.controllers[controller_name] = controller_class
            
                        """Load helper"""
                        try:
                            found_helper = imp.find_module('%s_helper' % controller_file, app_path)
                        except ImportError, e:
                            self.logger.debug("No helper found for %s" % controller_name)
                            continue
                        else:
                            helper_module = imp.load_module('%s_helper' % controller_file, *found_helper)
                            self.logger.debug("Loaded helper for %s" % controller_name)
                            helper_class = getattr(helper_module ,'%sHelper' % controller_file.title(), None)
                            if helper_class and issubclass(helper_class, ApplicationHelper):
                                self.helpers[controller_name] = helper_class
                        finally:
                            if found_helper:
                                found_helper[0].close()
            finally:
                if found_controller:
                    found_controller[0].close()
dataset/ETHPy150Open zeraien/django-url-framework/django_url_framework/site.py/Site.load_controllers/swapped operands of `%`