Loading ccserver/ccserver.py +3 −3 Original line number Diff line number Diff line Loading @@ -47,11 +47,11 @@ class CCServer(object): sock.listen(CCServer.LISTEN_BACKLOG) if certfile: logging.info('SSL Certificate: %s' % certfile) logging.info('SSL Certificate: %s', certfile) if keyfile: logging.info('SSL Key: %s' % certfile) logging.info('SSL Key: %s', certfile) logging.info('Started to listen on %s port %s' % (address, port)) logging.info('Started to listen on %s port %s', address, port) self.objects = ObjectsDB(self) Loading ccserver/conf.py +8 −8 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ class CCConf(object): filename = os.path.join(self._path, '%s.json' % login) if os.path.isfile(filename): conf = json.load(open(filename, 'r')) logging.debug('Getting configuration %s: %s' % (filename, conf)) logging.debug('Getting configuration %s: %s', filename, conf) return conf else: raise CCConf.UnknownAccount('%s is not a file' % filename) Loading @@ -110,7 +110,7 @@ class CCConf(object): ''' filename = os.path.join(self._path, '%s.json' % login) logging.debug('Writing configuration %s: %s' % (filename, conf)) logging.debug('Writing configuration %s: %s', filename, conf) if os.path.isfile(filename) ^ create: json.dump(conf, open(filename, 'w')) else: Loading Loading @@ -231,7 +231,7 @@ class CCConf(object): is_valid = auth(password, password_wo_method) == passwd_conf else: logging.warning('Bad authentication method for %s: ' '%s' % (login, m.group('method'))) '%s', login, m.group('method')) if is_valid: return conf['role'] else: Loading Loading @@ -264,8 +264,8 @@ class CCConf(object): :raise CCConf.UnknownAccount: if user login is unknown ''' logging.debug('Added tag %s:%s for %s account' % (tag_name, tag_value, login)) logging.debug('Added tag %s:%s for %s account', tag_name, tag_value, login) conf = self._get_conf(login) conf['tags'][tag_name] = tag_value self._set_conf(login, conf) Loading @@ -280,7 +280,7 @@ class CCConf(object): :raise CCConf.UnknownAccount: if user login is unknown ''' logging.debug('Removed tag %s for %s account' % (login, tag)) logging.debug('Removed tag %s for %s account', login, tag) conf = self._get_conf(login) if tag in conf['tags']: del conf['tags'][tag] Loading @@ -295,7 +295,7 @@ class CCConf(object): :raise CCConf.UnknownAccount: if user login is unknown ''' logging.debug('Removed %s account' % login) logging.debug('Removed %s account', login) filename = os.path.join(self._path, '%s.json' % login) if os.path.exists(filename): os.remove(filename) Loading @@ -313,7 +313,7 @@ class CCConf(object): :raise CCConf.AlreadyExistingAccount: if the login is already ''' logging.debug('Creating %s account with role %s' % (login, role)) logging.debug('Creating %s account with role %s', login, role) filename = os.path.join(self._path, '%s.json' % login) if os.path.exists(filename): raise CCConf.AlreadyExistingAccount('%s found' % filename) Loading ccserver/handlers.py +4 −4 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ class CCHandler(RpcHandler): # Filter the private members access: raise KeyError('Remote name %s is private.' % repr(name)) else: logging.debug('Called %s.%s' % (self.__class__.__name__, name)) logging.debug('Called %s.%s', self.__class__.__name__, name) return super(CCHandler, self).__getitem__(name) Loading Loading @@ -131,7 +131,7 @@ class CliHandler(OnlineCCHandler): ''' self._check(conn, 'list', query) logging.debug('Executed list function with query %s' % query) logging.debug('Executed list function with query %s', query) return self._server.list(query) def _vm_action(self, query, method, *args, **kwargs): Loading Loading @@ -470,8 +470,8 @@ class WelcomeHandler(CCHandler): raise AuthenticationError('Account is closed') if role is None: logging.info('New authentication from %s: ' 'failure' % login.encode('ascii', 'ignore')) logging.info('New authentication from %s: failure', login.encode('ascii', 'ignore')) raise AuthenticationError('Bad login/password') else: # If authentication is a success, try to register the client: Loading Loading
ccserver/ccserver.py +3 −3 Original line number Diff line number Diff line Loading @@ -47,11 +47,11 @@ class CCServer(object): sock.listen(CCServer.LISTEN_BACKLOG) if certfile: logging.info('SSL Certificate: %s' % certfile) logging.info('SSL Certificate: %s', certfile) if keyfile: logging.info('SSL Key: %s' % certfile) logging.info('SSL Key: %s', certfile) logging.info('Started to listen on %s port %s' % (address, port)) logging.info('Started to listen on %s port %s', address, port) self.objects = ObjectsDB(self) Loading
ccserver/conf.py +8 −8 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ class CCConf(object): filename = os.path.join(self._path, '%s.json' % login) if os.path.isfile(filename): conf = json.load(open(filename, 'r')) logging.debug('Getting configuration %s: %s' % (filename, conf)) logging.debug('Getting configuration %s: %s', filename, conf) return conf else: raise CCConf.UnknownAccount('%s is not a file' % filename) Loading @@ -110,7 +110,7 @@ class CCConf(object): ''' filename = os.path.join(self._path, '%s.json' % login) logging.debug('Writing configuration %s: %s' % (filename, conf)) logging.debug('Writing configuration %s: %s', filename, conf) if os.path.isfile(filename) ^ create: json.dump(conf, open(filename, 'w')) else: Loading Loading @@ -231,7 +231,7 @@ class CCConf(object): is_valid = auth(password, password_wo_method) == passwd_conf else: logging.warning('Bad authentication method for %s: ' '%s' % (login, m.group('method'))) '%s', login, m.group('method')) if is_valid: return conf['role'] else: Loading Loading @@ -264,8 +264,8 @@ class CCConf(object): :raise CCConf.UnknownAccount: if user login is unknown ''' logging.debug('Added tag %s:%s for %s account' % (tag_name, tag_value, login)) logging.debug('Added tag %s:%s for %s account', tag_name, tag_value, login) conf = self._get_conf(login) conf['tags'][tag_name] = tag_value self._set_conf(login, conf) Loading @@ -280,7 +280,7 @@ class CCConf(object): :raise CCConf.UnknownAccount: if user login is unknown ''' logging.debug('Removed tag %s for %s account' % (login, tag)) logging.debug('Removed tag %s for %s account', login, tag) conf = self._get_conf(login) if tag in conf['tags']: del conf['tags'][tag] Loading @@ -295,7 +295,7 @@ class CCConf(object): :raise CCConf.UnknownAccount: if user login is unknown ''' logging.debug('Removed %s account' % login) logging.debug('Removed %s account', login) filename = os.path.join(self._path, '%s.json' % login) if os.path.exists(filename): os.remove(filename) Loading @@ -313,7 +313,7 @@ class CCConf(object): :raise CCConf.AlreadyExistingAccount: if the login is already ''' logging.debug('Creating %s account with role %s' % (login, role)) logging.debug('Creating %s account with role %s', login, role) filename = os.path.join(self._path, '%s.json' % login) if os.path.exists(filename): raise CCConf.AlreadyExistingAccount('%s found' % filename) Loading
ccserver/handlers.py +4 −4 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ class CCHandler(RpcHandler): # Filter the private members access: raise KeyError('Remote name %s is private.' % repr(name)) else: logging.debug('Called %s.%s' % (self.__class__.__name__, name)) logging.debug('Called %s.%s', self.__class__.__name__, name) return super(CCHandler, self).__getitem__(name) Loading Loading @@ -131,7 +131,7 @@ class CliHandler(OnlineCCHandler): ''' self._check(conn, 'list', query) logging.debug('Executed list function with query %s' % query) logging.debug('Executed list function with query %s', query) return self._server.list(query) def _vm_action(self, query, method, *args, **kwargs): Loading Loading @@ -470,8 +470,8 @@ class WelcomeHandler(CCHandler): raise AuthenticationError('Account is closed') if role is None: logging.info('New authentication from %s: ' 'failure' % login.encode('ascii', 'ignore')) logging.info('New authentication from %s: failure', login.encode('ascii', 'ignore')) raise AuthenticationError('Bad login/password') else: # If authentication is a success, try to register the client: Loading