diff options
author | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2020-04-29 00:38:09 +0100 |
---|---|---|
committer | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2020-05-29 20:35:15 +0100 |
commit | f8fbd3f1c94a1ca05b3f918141b30d036948a2ae (patch) | |
tree | fa2d01a350fa68c899f37f00be099c8d81a1085e /lorry | |
parent | f060919e92308b70c5bb28398d2e71ee849da677 (diff) | |
download | lorry-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-x | lorry | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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): |