Implement dry-run on Account() level
1) Set attribute self.dryrun depending on whether we are in dry-run mode. 2) Don't actually call hooks in --dry-run (just log what you would invoke 3) Don't write out the mbnames file in --dry-run mode. Repository, and Folder levels still need to be protected in dry-run mode as of now. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
@ -461,7 +461,10 @@ class UIBase(object):
|
||||
################################################## Hooks
|
||||
|
||||
def callhook(self, msg):
|
||||
self.info(msg)
|
||||
if self.dryrun:
|
||||
self.info("[DRYRUN] {}".format(msg))
|
||||
else:
|
||||
self.info(msg)
|
||||
|
||||
################################################## Other
|
||||
|
||||
|
Reference in New Issue
Block a user