mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Fix invalid string escape sequences.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user