summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--obnamlib/plugins/exclude_pathnames_plugin.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/obnamlib/plugins/exclude_pathnames_plugin.py b/obnamlib/plugins/exclude_pathnames_plugin.py
index 9aad8070..852d29d2 100644
--- a/obnamlib/plugins/exclude_pathnames_plugin.py
+++ b/obnamlib/plugins/exclude_pathnames_plugin.py
@@ -17,6 +17,7 @@
import hashlib
import logging
import os
+import re
import stat
import time
@@ -94,7 +95,8 @@ class ExcludePathnamesPlugin(obnamlib.ObnamPlugin):
try:
compiler(regexp)
except re.error as e:
- msg = ('error compiling regular expression "%s": %s' % (x, e))
+ msg = ('error compiling regular expression "%s": %s' %
+ (regexp, e))
logging.error(msg)
self.progress.error(msg)