summaryrefslogtreecommitdiff
path: root/lorry
diff options
context:
space:
mode:
authorBen Hutchings <ben.hutchings@codethink.co.uk>2020-04-29 00:38:09 +0100
committerBen Hutchings <ben.hutchings@codethink.co.uk>2020-05-29 20:35:15 +0100
commitf8fbd3f1c94a1ca05b3f918141b30d036948a2ae (patch)
treefa2d01a350fa68c899f37f00be099c8d81a1085e /lorry
parentf060919e92308b70c5bb28398d2e71ee849da677 (diff)
downloadlorry-f8fbd3f1c94a1ca05b3f918141b30d036948a2ae.tar.gz
lorry: Fix deprecated syntax in sed command
The sed command includes the sequences '\{' and '\}' which are not valid escape sequences and so expand to themselves (which is what is needed). Unrecognised escape sequences are deprecated since Python 3.6 and will become a syntax error in future. Use raw-string syntax to avoid the need for double-backslashes. Found with pycodestyle.
Diffstat (limited to 'lorry')
-rwxr-xr-xlorry2
1 files changed, 1 insertions, 1 deletions
diff --git a/lorry b/lorry
index f949263..0cc5329 100755
--- a/lorry
+++ b/lorry
@@ -154,7 +154,7 @@ class Lorry(cliapp.Application):
# expression below will remove all garbage lines that appear
# between the first line (the bundle format meta comment) and
# the list of refs.
- expr = '1,/^[0-9a-f]\{40\}/{ /^[0-9a-f]\{40\}/!{/^[^#]/d}}'
+ expr = r'1,/^[0-9a-f]\{40\}/{ /^[0-9a-f]\{40\}/!{/^[^#]/d}}'
self.run_program(['sed', '-i', '-e', expr, path], cwd=gitdir)
def make_tarball(self, name, gitdir):