Skip to content

Commit 78cff47

Browse files
committed
Fix regex string
1 parent fa27988 commit 78cff47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

github_backup/github_backup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,8 @@ def get_github_repo_url(args, repository):
423423
if repository.get('is_gist'):
424424
if args.prefer_ssh:
425425
# The git_pull_url value is always https for gists, so we need to transform it to ssh form
426-
repo_url = re.sub('^https?:\/\/(.+)\/(.+)\.git$', r'git@\1:\2.git', repository['git_pull_url'])
427-
repo_url = re.sub('^git@gist\.', 'git@', repo_url) # strip gist subdomain for better hostkey compatibility
426+
repo_url = re.sub(r'^https?:\/\/(.+)\/(.+)\.git$', r'git@\1:\2.git', repository['git_pull_url'])
427+
repo_url = re.sub(r'^git@gist\.', 'git@', repo_url) # strip gist subdomain for better hostkey compatibility
428428
else:
429429
repo_url = repository['git_pull_url']
430430
return repo_url

0 commit comments

Comments
 (0)