diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-02-01 21:31:43 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-02-01 21:31:43 +0000 |
commit | d027e70ab0b2ac89a1789a3eb6a8e2c8465e8c82 (patch) | |
tree | d28a4ff7edca5498daf99309b8aa63abcdb47d41 | |
parent | 10517c005c7fb6c4b43cade43a506aa7d9415459 (diff) | |
download | genbackupdata-d027e70ab0b2ac89a1789a3eb6a8e2c8465e8c82.tar.gz |
Add --quiet option.
-rwxr-xr-x | genbackupdata | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/genbackupdata b/genbackupdata index dbdb905..becd5e9 100755 --- a/genbackupdata +++ b/genbackupdata @@ -46,6 +46,7 @@ class GenbackupdataApp(cliapp.Application): 'seed for random number generator ' '(default: %default)', default=0) + self.add_boolean_setting(['quiet'], 'do not report progress') def process_args(self, args): outputdir = args[0] @@ -86,6 +87,8 @@ class GenbackupdataApp(cliapp.Application): def setup_ttystatus(self): self.status = ttystatus.TerminalStatus(period=0.1) + if self['quiet']: + self.status.disable() self.status['written'] = 0 self.status['total'] = 0 self.status.add(ttystatus.Literal('Generating: ')) |