summaryrefslogtreecommitdiff
path: root/debian/patches/0100-config.diff
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-08-11 05:41:14 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-08-11 05:41:14 +0200
commite21453143818389060bf0bd6cfa627c11a63ede5 (patch)
tree88dc9473cc4e7efedad44682b1eb2e54d1e3e7c2 /debian/patches/0100-config.diff
parent58816f014aeba5996db6f543e9efd21dd5e1db3a (diff)
New upstream release; refresh patches
Diffstat (limited to 'debian/patches/0100-config.diff')
-rw-r--r--debian/patches/0100-config.diff81
1 files changed, 39 insertions, 42 deletions
diff --git a/debian/patches/0100-config.diff b/debian/patches/0100-config.diff
index ce4dba7..8529874 100644
--- a/debian/patches/0100-config.diff
+++ b/debian/patches/0100-config.diff
@@ -5,47 +5,6 @@ Author: Jörg Frings-Fürst <jff@jff-webhosting.net>
Last-Update: 2014-05-12
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: trunk/mwc.py
-===================================================================
---- trunk.orig/mwc.py
-+++ trunk/mwc.py
-@@ -319,7 +319,7 @@ def pollWebsites():
-
- if __name__ == "__main__":
-
-- configMod = 'config'
-+ configMod = '/etc/mwc/mwc-config'
- dryrun = None
-
- try:
-@@ -335,9 +335,24 @@ if __name__ == "__main__":
- configMod = arg
- elif opt in ('-d', '--dry-run'):
- dryrun = arg
--
-- config = importlib.import_module(configMod)
--
-+ #
-+ # add code to load config from nonsystem path
-+ # and change to datadir
-+ #
-+ try:
-+ path = os.path.dirname(configMod)
-+ fullname = os.path.basename(configMod)
-+ sys.path.append(path)
-+ config = importlib.import_module(fullname)
-+ except:
-+ print('Error: loading config')
-+ sys.exit(2)
-+ try:
-+ os.chdir(config.datadir)
-+ except:
-+ print('Error: datadir not found')
-+ sys.exit(3)
-+
- if dryrun:
- for site in config.sites:
- if site['shortname'] == dryrun:
Index: trunk/config_template.py
===================================================================
--- trunk.orig/config_template.py
@@ -56,7 +15,7 @@ Index: trunk/config_template.py
# Copyright: (2013-2014) Michael Till Beck <Debianguru@gmx.de>
# License: GPL-2.0+
-@@ -46,11 +44,11 @@ sender = 'me@mymail.com'
+@@ -47,11 +45,11 @@ sender = 'me@mymail.com'
smtphost = 'mysmtpprovider.com'
useTLS = True
smtpport = 587
@@ -113,3 +72,41 @@ Index: trunk/mwcfeedserver.py
+except KeyboardInterrupt:
+ pass
+httpd.server_close()
+Index: trunk/mwc.py
+===================================================================
+--- trunk.orig/mwc.py
++++ trunk/mwc.py
+@@ -334,7 +334,7 @@ def pollWebsites():
+
+ if __name__ == "__main__":
+
+- configMod = 'config'
++ configMod = '/etc/mwc/mwc-config'
+ dryrun = None
+
+ try:
+@@ -351,7 +351,23 @@ if __name__ == "__main__":
+ elif opt in ('-d', '--dry-run'):
+ dryrun = arg
+
+- config = importlib.import_module(configMod)
++ #
++ # add code to load config from nonsystem path
++ # and change to datadir
++ #
++ try:
++ path = os.path.dirname(configMod)
++ fullname = os.path.basename(configMod)
++ sys.path.append(path)
++ config = importlib.import_module(fullname)
++ except:
++ print('Error: loading config')
++ sys.exit(2)
++ try:
++ os.chdir(config.datadir)
++ except:
++ print('Error: datadir not found')
++ sys.exit(3)
+
+ if dryrun:
+ for site in config.sites: