summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2019-07-14 16:56:34 +0200
committerJörg Frings-Fürst <debian@jff.email>2019-07-14 16:56:34 +0200
commit4d9fabf827de7bbfd10470529a46b8e3b6a062ca (patch)
treee5416e47b0fabe697e70bb902bc9b1e5e98cb2d5
parent3e926e08d444e0f1d52468e2341277c36a194880 (diff)
parent749921d2ce9862143db6ef80a6acc7c803d9f0f7 (diff)
Merge branch 'release/debian/2.0.5-1'HEADdebian/2.0.5-1master
-rw-r--r--.gitignore2
-rw-r--r--debian/changelog13
-rw-r--r--debian/compat2
-rw-r--r--debian/control4
-rw-r--r--debian/copyright2
-rw-r--r--debian/mwc.links3
-rwxr-xr-xmwc.py8
-rwxr-xr-xmwctools.py7
8 files changed, 28 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index 91ef9c0..4ccd411 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,4 @@
/*.txt
*~
*.pyc
-.pc
+
diff --git a/debian/changelog b/debian/changelog
index 14f9941..70d54bf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+mwc (2.0.5-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Migrate to debhelper 12:
+ - Change debian/compat to 12.
+ - Bump minimum debhelper version in debian/control to >= 12.
+ * Declare compliance with Debian Policy 4.4.0 (No changes needed).
+ * Move mwcfeedserver from /usr/sbin to /usr/bin.
+ * debian/copyright:
+ - Add year 2019 to debian/*
+
+ -- Jörg Frings-Fürst <debian@jff.email> Sun, 14 Jul 2019 10:30:27 +0200
+
mwc (2.0.4-3) unstable; urgency=medium
* Declare compliance with Debian Policy 4.2.1 (No changes needed).
diff --git a/debian/compat b/debian/compat
index b4de394..48082f7 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-11
+12
diff --git a/debian/control b/debian/control
index 4ea2f78..ba8d83a 100644
--- a/debian/control
+++ b/debian/control
@@ -3,10 +3,10 @@ Section: utils
Priority: optional
Maintainer: Jörg Frings-Fürst <debian@jff.email>
Build-Depends:
- debhelper (>= 11),
+ debhelper (>= 12),
dh-python,
python3-all
-Standards-Version: 4.2.1
+Standards-Version: 4.4.0
Homepage: https://github.com/Debianguru/MailWebsiteChanges
Vcs-Git: git://jff.email/opt/git/mwc.git
Vcs-Browser: https://jff.email/cgit/mwc.git
diff --git a/debian/copyright b/debian/copyright
index ef90ff9..08e2087 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -7,7 +7,7 @@ Copyright: 2013-2017 Michael Till Beck <Debianguru@gmx.de>
License: GPL-2+
Files: debian/*
-Copyright: 2014-2017 Jörg Frings-Fürst <debian@jff.email>
+Copyright: 2014-2019 Jörg Frings-Fürst <debian@jff.email>
License: GPL-3+
License: GPL-2+
diff --git a/debian/mwc.links b/debian/mwc.links
index 82885c9..143bb8d 100644
--- a/debian/mwc.links
+++ b/debian/mwc.links
@@ -1,3 +1,2 @@
/usr/share/mwc/mwc.py /usr/bin/mwc
-/usr/share/mwc/mwcfeedserver.py /usr/sbin/mwcfeedserver
-
+/usr/share/mwc/mwcfeedserver.py /usr/bin/mwcfeedserver
diff --git a/mwc.py b/mwc.py
index 6a48317..22a9dca 100755
--- a/mwc.py
+++ b/mwc.py
@@ -4,6 +4,8 @@
# Copyright: (2013-2017) Michael Till Beck <Debianguru@gmx.de>
# License: GPL-2.0+
+#test
+
import io
from lxml import etree
import hashlib
@@ -78,7 +80,7 @@ def sendmail(receiver, subject, content, sendAsHtml, link, encoding=None):
else:
if link is not None:
content = link + '\n\n' + content
- mail = MIMEText(content, 'text', encoding)
+ mail = MIMEText(content, 'plain', encoding)
mail['From'] = config.sender
mail['To'] = receiver
@@ -93,7 +95,7 @@ def sendmail(receiver, subject, content, sendAsHtml, link, encoding=None):
if config.smtpusername is not None:
mailsession.login(config.smtpusername, config.smtppwd)
- mailsession.sendmail(config.sender, receiver.split(','), mail.as_string())
+ mailsession.send_message(mail)
# returns a list of all content that is stored locally for a specific site
@@ -170,7 +172,7 @@ def pollWebsites():
sessionHashes.append(contenthash)
changedContents.append(content)
- subject = '[' + site['name'] + '] ' + content.title
+ subject = '[' + site['name'] + '] ' + ("Update available" if content.title is None else content.title)
print(' ' + subject)
if config.enableMailNotifications and len(fileHashes) > 0:
sendAsHtml = (content.contenttype == 'html')
diff --git a/mwctools.py b/mwctools.py
index cefbbf0..1dca2e6 100755
--- a/mwctools.py
+++ b/mwctools.py
@@ -33,12 +33,13 @@ class Receiver(Parser):
class Content:
- def __init__(self, uri, encoding, title, content, contenttype):
+ def __init__(self, uri, encoding, title, content, contenttype, additional=None):
self.uri = uri
self.encoding = encoding
self.title = title
self.content = content
self.contenttype = contenttype
+ self.additional = additional
# returns a short subject line
@@ -106,13 +107,13 @@ class CommandReceiver(Receiver):
contentList = []
# run command and retrieve output
- process = subprocess.Popen(self.command, stdout=subprocess.PIPE, shell=True, close_fds=True)
+ process = subprocess.Popen(self.command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True, close_fds=True)
thefile = process.stdout
result = thefile.read().decode(self.encoding, errors='ignore')
thefile.close()
if process.wait() != 0:
- raise Exception("process terminated with an error")
+ raise Exception("process terminated with an error: " + str(process.stderr) + "\n" + result)
contentList.append(Content(uri=None, encoding=self.encoding, title=None, content=result, contenttype=self.contenttype))
return contentList