Fixed remaining eslint errors for services/**/*.js

This commit is contained in:
witzig 2017-06-22 18:29:42 +02:00
parent c7ba0235c5
commit 8b74730d08
3 changed files with 8 additions and 8 deletions

View file

@ -37,14 +37,14 @@ function spawnProcess(tid, executable, args, outFile, errFile, cwd, uid, gid) {
return; return;
} }
privilegeHelpers.ensureMailtrainOwner(outFile, (err) => { privilegeHelpers.ensureMailtrainOwner(outFile, err => {
if (err) { if (err) {
log.warn('Executor', 'Cannot change owner of output file of process tid:%s.', tid) log.warn('Executor', 'Cannot change owner of output file of process tid:%s.', tid);
} }
privilegeHelpers.ensureMailtrainOwner(errFile, (err) => { privilegeHelpers.ensureMailtrainOwner(errFile, err => {
if (err) { if (err) {
log.warn('Executor', 'Cannot change owner of error output file of process tid:%s.', tid) log.warn('Executor', 'Cannot change owner of error output file of process tid:%s.', tid);
} }
const options = { const options = {
@ -79,12 +79,12 @@ function spawnProcess(tid, executable, args, outFile, errFile, cwd, uid, gid) {
delete processes[tid]; delete processes[tid];
log.info('Executor', 'Process tid:%s pid:%s exited with code %s signal %s.', tid, pid, code, signal); log.info('Executor', 'Process tid:%s pid:%s exited with code %s signal %s.', tid, pid, code, signal);
fs.close(outFd, (err) => { fs.close(outFd, err => {
if (err) { if (err) {
log.error('Executor', err); log.error('Executor', err);
} }
fs.close(errFd, (err) => { fs.close(errFd, err => {
if (err) { if (err) {
log.error('Executor', err); log.error('Executor', err);
} }

View file

@ -135,7 +135,7 @@ function checkEntries(parent, entries, callback) {
if (/\[RSS_ENTRY[\w]*\]/i.test(html)) { if (/\[RSS_ENTRY[\w]*\]/i.test(html)) {
html = html.replace(/\[RSS_ENTRY\]/, entry.content); //for backward compatibility html = html.replace(/\[RSS_ENTRY\]/, entry.content); //for backward compatibility
Object.keys(entry).forEach(key => { Object.keys(entry).forEach(key => {
html = html.replace('\[RSS_ENTRY_'+key.toUpperCase()+'\]', entry[key]) html = html.replace('[RSS_ENTRY_' + key.toUpperCase() + ']', entry[key]);
}); });
} else { } else {
html = entry.content + html; html = entry.content + html;

View file

@ -29,7 +29,7 @@ let server = new SMTPServer({
let user = address.address.split('@').shift(); let user = address.address.split('@').shift();
let host = address.address.split('@').pop(); let host = address.address.split('@').pop();
if (host !== configItems.verpHostname || !/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i.test(user)) { if (host !== configItems.verpHostname || !/^[a-z0-9_-]+\.[a-z0-9_-]+\.[a-z0-9_-]+$/i.test(user)) {
err = new Error('Unknown user ' + address.address); err = new Error('Unknown user ' + address.address);
err.responseCode = 510; err.responseCode = 510;
return callback(err); return callback(err);