Make self.ui available in all Repository() derivatives
This enables us to make use of self.ui in all repositories without having to import and use getglobalui() in all types of repositories and all places. Note that this patch only makes this available, it does not yet make use of it. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
d05162675c
commit
cc64a0952c
@ -45,6 +45,7 @@ def LoadRepository(name, account, reqtype):
|
||||
|
||||
class BaseRepository(CustomConfig.ConfigHelperMixin):
|
||||
def __init__(self, reposname, account):
|
||||
self.ui = getglobalui()
|
||||
self.account = account
|
||||
self.config = account.getconfig()
|
||||
self.name = reposname
|
||||
@ -166,7 +167,7 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
|
||||
except (KeyboardInterrupt):
|
||||
raise
|
||||
except:
|
||||
getglobalui().warn("ERROR Attempting to create folder " \
|
||||
self.ui.warn("ERROR Attempting to create folder " \
|
||||
+ key + ":" +traceback.format_exc())
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user