Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions c3po/mod/communicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,10 @@ def git_push(git_message=None, git_repository=None, git_branch=None, locale_root
raise PODocsError(e)

try:
subprocess.check_call(['git', 'ls-remote', git_repository])
except subprocess.CalledProcessError:
subprocess.check_call(['git', 'remote', 'add', 'po_translator', git_repository])
except subprocess.CalledProcessError as e:
try:
subprocess.check_call(['git', 'remote', 'rm', 'po_translator'])
subprocess.check_call(['git', 'remote', 'add', 'po_translator', git_repository])
except subprocess.CalledProcessError as e:
raise PODocsError(e)
Expand Down