Loading ccserver/conf.py +9 −6 Original line number Diff line number Diff line Loading @@ -356,15 +356,18 @@ class CCConf(object): Remove a right rule from the provided account. :param login: the login of the account :param index: the index of the rule to delete :param index: the index of the rule to delete or None for all rules ''' conf = self._get_conf(login) rights = conf['rights'] if index is None: conf['rights'] = [] else: try: rights.pop(index) conf['rights'].pop(index) except IndexError: raise CCConf.OutOfRangeIndexError('Bad rule index %s' % repr(index)) raise CCConf.OutOfRangeIndexError('Bad rule index ' '%s' % repr(index)) self._set_conf(login, conf) def list_accounts(self): Loading Loading
ccserver/conf.py +9 −6 Original line number Diff line number Diff line Loading @@ -356,15 +356,18 @@ class CCConf(object): Remove a right rule from the provided account. :param login: the login of the account :param index: the index of the rule to delete :param index: the index of the rule to delete or None for all rules ''' conf = self._get_conf(login) rights = conf['rights'] if index is None: conf['rights'] = [] else: try: rights.pop(index) conf['rights'].pop(index) except IndexError: raise CCConf.OutOfRangeIndexError('Bad rule index %s' % repr(index)) raise CCConf.OutOfRangeIndexError('Bad rule index ' '%s' % repr(index)) self._set_conf(login, conf) def list_accounts(self): Loading