summaryrefslogtreecommitdiff
path: root/debian/patches/0110-syslog.diff
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-10-01 20:19:42 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-10-01 20:19:42 +0200
commitb8757ee40b25ad8dac375c35f23785982985c215 (patch)
tree6ede28c8add650f5fcef3c920de66da2e0cd7c80 /debian/patches/0110-syslog.diff
parent775e974b25e1c055ecaba84c50e1fed12e57a82d (diff)
parent9a955c414e34de441b5f188520314d54e3c5b3c5 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'debian/patches/0110-syslog.diff')
-rw-r--r--debian/patches/0110-syslog.diff64
1 files changed, 0 insertions, 64 deletions
diff --git a/debian/patches/0110-syslog.diff b/debian/patches/0110-syslog.diff
deleted file mode 100644
index bd61d81..0000000
--- a/debian/patches/0110-syslog.diff
+++ /dev/null
@@ -1,64 +0,0 @@
-Description: add syslog messages on errors
-Author: Jörg Frings-Fürst <debian@jffwebhosting.net>
-Forwarded: via mail
-Last-Update: 2014-05-22
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: trunk/mwc.py
-===================================================================
---- trunk.orig/mwc.py
-+++ trunk/mwc.py
-@@ -21,6 +21,7 @@ import os
- import sys
- import getopt
- import traceback
-+import syslog
-
- import subprocess
-
-@@ -248,11 +249,13 @@ def sendmail(receiver, subject, content,
- #
- except:
- print('Error: Open smtp-session')
-+ syslog.syslog(syslog.LOG_ERR, 'can not open smtp session')
- exit(4)
- try:
- mailsession.sendmail(config.sender, receiver.split(','), mail.as_string())
- except:
- print('Error: sendmail')
-+ syslog.syslog(syslog.LOG_ERR, 'error on sendmail')
- exit(5)
-
- # returns a list of all content that is stored locally for a specific site
-@@ -349,6 +352,11 @@ if __name__ == "__main__":
- configMod = '/etc/mwc/mwc-config'
- dryrun = None
-
-+ #
-+ # add syslog open
-+ #
-+ syslog.openlog()
-+
- try:
- opts, args = getopt.getopt(sys.argv[1:], 'hc:d:', ['help', 'config=', 'dry-run='])
- except getopt.GetoptError:
-@@ -374,11 +382,13 @@ if __name__ == "__main__":
- config = importlib.import_module(fullname)
- except:
- print('Error: loading config')
-+ syslog.syslog(syslog.LOG_ERR, 'can not found / load mwc-config')
- sys.exit(2)
- try:
- os.chdir(config.datadir)
- except:
- print('Error: datadir not found')
-+ syslog.syslog(syslog.LOG_ERR, 'datadir not found')
- sys.exit(3)
-
- if dryrun:
-@@ -400,3 +410,5 @@ if __name__ == "__main__":
- if mailsession:
- mailsession.quit()
- mailsession = None
-+
-+ syslog.closelog()