1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-19 12:23:49 +03:00

python/samba/common: Fix typos

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton
2023-02-28 16:56:24 +13:00
committed by Andrew Bartlett
parent 262b40d833
commit 9e6f3df5d8

View File

@@ -89,7 +89,7 @@ def get_bytes(bytesorstring):
if isinstance(bytesorstring, str):
tmp = bytesorstring.encode('utf8')
elif not isinstance(bytesorstring, bytes):
raise ValueError('Expected byte or string for %s:%s' % (type(bytesorstring), bytesorstring))
raise ValueError('Expected bytes or string for %s:%s' % (type(bytesorstring), bytesorstring))
return tmp
# helper function to get a string from a variable that maybe 'str' or
@@ -103,5 +103,5 @@ def get_string(bytesorstring):
if isinstance(bytesorstring, bytes):
tmp = bytesorstring.decode('utf8')
elif not isinstance(bytesorstring, str):
raise ValueError('Expected byte of string for %s:%s' % (type(bytesorstring), bytesorstring))
raise ValueError('Expected bytes or string for %s:%s' % (type(bytesorstring), bytesorstring))
return tmp