Skip to content

Commit d6c97e5

Browse files
committed
Remove invalid escape chararcter
To avoid this warning: ``` ckanapi/ckanapi/cli/load.py:307: SyntaxWarning: "\." is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\."? A raw string is also an option. new_name = re.sub('[0-9\.-]','',name) ```
1 parent a4c2c76 commit d6c97e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ckanapi/cli/load.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def _upload_logo(ckan,obj_orig):
304304
else:
305305
f = requests.get(obj['image_display_url'], stream=True, timeout=REQUEST_TIMEOUT)
306306
name,ext = obj['image_url'].rsplit('.',1) #reformulate image_url for new site
307-
new_name = re.sub('[0-9\.-]','',name)
307+
new_name = re.sub('[0-9.-]','',name)
308308
new_url = new_name+'.'+ext
309309
obj['image_upload'] = (new_url, f.raw)
310310
ckan.action.group_update(**obj)

0 commit comments

Comments
 (0)