mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 10:51:24 -07:00
Fix invalid string escape sequences.
This commit is contained in:
parent
f9cd50411f
commit
e45c763b64
48 changed files with 77 additions and 77 deletions
|
@ -586,7 +586,7 @@ def human_to_bytes(number, default_unit=None, isbits=False):
|
|||
ex:
|
||||
human_to_bytes('10M') <=> human_to_bytes(10, 'M')
|
||||
'''
|
||||
m = re.search('^\s*(\d*\.?\d*)\s*([A-Za-z]+)?', str(number), flags=re.IGNORECASE)
|
||||
m = re.search(r'^\s*(\d*\.?\d*)\s*([A-Za-z]+)?', str(number), flags=re.IGNORECASE)
|
||||
if m is None:
|
||||
raise ValueError("human_to_bytes() can't interpret following string: %s" % str(number))
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue