Open Ladeia opened 3 months ago
When I upgrade smbmap
from apt I get a warning
/usr/lib/python3/dist-packages/smbmap/smbmap.py:441: SyntaxWarning: invalid escape sequence '\p'
stringbinding = 'ncacn_np:%s[\pipe\svcctl]' % remoteName
When I create a python script
# /tmp/foo.py
stringbinding = 'ncacn_np:%s[\pipe\svcctl]' % 'remoteName'
and check it with python3 -Wd /tmp/foo.py
I'm able to reproduce the SyntaxWarning
/tmp/foo.py:2: SyntaxWarning: invalid escape sequence '\p'
stringbinding = 'ncacn_np:%s[\pipe\svcctl]' % 'remoteName'
I think that might be the motivation of this change, however it changes the meaning of that string.
To resolve this, I would suggest to use raw-string (with r
prefix) and change the line to
stringbinding = r'ncacn_np:%s[\pipe\svcctl]' % remoteName
Note: I'm not a contributor, I just want my apt upgrade
to be happy :blush:
Thanks @SukiCZ. I applied your suggestion in PR.
fix stringbinding command on smbmap.py file