2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00

python: Fix invalid escape sequences.

It appears that Python silently treats invalid escape sequences in
strings as literals, e.g. "\." is the same as "\\.".  Newer versions of
checkpatch complain, and it does seem reasonable to me to fix these.

Acked-by: Numan Siddique <nusiddiq@redhat.com>
Tested-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Ben Pfaff
2019-01-10 15:23:45 -08:00
parent 70506167a5
commit 145a7e88bb
9 changed files with 22 additions and 22 deletions

View File

@@ -31,7 +31,7 @@ def abs_file_name(dir_, file_name):
This differs from os.path.abspath() in that it will never change the
meaning of a file name.
On Windows an absolute path contains ':' ( i.e: C:\ ) """
On Windows an absolute path contains ':' ( i.e: C:\\ ) """
if file_name.startswith('/') or file_name.find(':') > -1:
return file_name
else: