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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user