diff --git a/dh_python2 b/dh_python2 index 7ce6955e88448b7adc77a6e28fa5aab64ffc0515..46081867f8f209cbb2903a124364b0ffd73adef4 100755 --- a/dh_python2 +++ b/dh_python2 @@ -589,7 +589,7 @@ def main(): dependencies.depend("python%d.%d" % version) for pattern in options.regexpr or []: - args += " -X '%s'" % pattern.replace("'", r"\'") + args += " -X '%s'" % pattern.replace("'", r"'\''") dh.autoscript(package, 'postinst', 'postinst-pycompile', args)