summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-10-29 17:20:18 +0200
committerFlorent Le Coz <louiz@louiz.org>2011-10-29 17:20:18 +0200
commit21f0c8f3f348ca515b81208c73704d5fd7b10328 (patch)
treeb078d74474a2f4d24764cc2e5f1b03d48f98ad3d
parentdb1e84d34e910812d494673a1d78d85f38e2b725 (diff)
downloadpoezio-21f0c8f3f348ca515b81208c73704d5fd7b10328.tar.gz
poezio-21f0c8f3f348ca515b81208c73704d5fd7b10328.tar.bz2
poezio-21f0c8f3f348ca515b81208c73704d5fd7b10328.tar.xz
poezio-21f0c8f3f348ca515b81208c73704d5fd7b10328.zip
Fix the url matching in the link plugin
-rw-r--r--plugins/link.py6
-rw-r--r--src/core.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/link.py b/plugins/link.py
index 34f0a441..8ef52982 100644
--- a/plugins/link.py
+++ b/plugins/link.py
@@ -19,9 +19,9 @@ class Plugin(BasePlugin):
if not messages:
return None
for message in messages[::-1]:
- match = url_pattern.search(clean_text(message.txt))
- if match:
- for url in list(match.groups())[::-1]:
+ matches = url_pattern.findall(clean_text(message.txt))
+ if matches:
+ for url in matches[::-1]:
if nb == 1:
return url
else:
diff --git a/src/core.py b/src/core.py
index 1fb06b38..88a726ea 100644
--- a/src/core.py
+++ b/src/core.py
@@ -1730,7 +1730,7 @@ class Core(object):
try:
self.remote_fifo.write(command)
except (IOError) as e:
- self.information('Could not execute [%s]: %s' % (command, e,), 'Error')
+ self.information('Could not execute [%s]: %s' % (command.strip(), e,), 'Error')
self.remote_fifo = None
else:
pass