mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2025-11-02 01:25:49 +01:00
Use ui.ui.load() only if available
This commit is contained in:
@@ -427,7 +427,10 @@ def updatebookmarks(repo, peer):
|
||||
def get_repo(url, alias):
|
||||
global peer
|
||||
|
||||
myui = ui.ui.load()
|
||||
if hasattr(ui.ui, 'load'):
|
||||
myui = ui.ui.load()
|
||||
else:
|
||||
myui = ui.ui()
|
||||
myui.setconfig('ui', 'interactive', 'off')
|
||||
myui.fout = sys.stderr
|
||||
|
||||
|
||||
Reference in New Issue
Block a user