diff options
author | Sérgio Almeida <mephx.x@gmail.com> | 2009-07-28 05:45:25 +0100 |
---|---|---|
committer | Sérgio Almeida <mephx.x@gmail.com> | 2009-07-28 05:45:25 +0100 |
commit | d2a989526ef7b6b1e6c51d60577cf483e8ad32db (patch) | |
tree | b21bdc383a5ead1586ecd71002a4e7b3341c1cc1 /uio.py | |
parent | Added license to install.sh (diff) | |
download | uselect-d2a989526ef7b6b1e6c51d60577cf483e8ad32db.tar.gz uselect-d2a989526ef7b6b1e6c51d60577cf483e8ad32db.tar.bz2 uselect-d2a989526ef7b6b1e6c51d60577cf483e8ad32db.zip |
Added output to profile actions
Diffstat (limited to 'uio.py')
-rw-r--r-- | uio.py | 21 |
1 files changed, 10 insertions, 11 deletions
@@ -272,7 +272,7 @@ class PrintSystem: self.print_table([[bold + action.name + reset, \ action.description]]) - def print_action(self, module, action): + def print_action(self, action): self.print_table([[bold + action.description + reset, '']]) self.print_line('') self.print_table(self.format_action(action)) @@ -312,18 +312,24 @@ class ProfilePrintSystem(PrintSystem): def print_ui(self, profile = None, profiles = None, args = None, \ action = None): - self.print_usage(profile = profile, action = action) - self.print_line('') + if profile == None: + self.print_usage(profile = profile, action = action) + self.print_line('') self.print_options() self.print_line('') self.print_profiles(profiles) self.print_line('') - elif profiles == None: + elif profiles == None and action == None: + self.print_usage(profile = profile, action = action) + self.print_line('') self.print_profile(profile) self.print_line('') self.print_actions(profile) self.print_line('') + else: + for line in action.output: + print line def print_profiles(self, profiles): self.print_line(highlight + space + 'Profiles:' + reset) @@ -338,13 +344,6 @@ class ProfilePrintSystem(PrintSystem): self.print_line(space * 4 + bold + 'Author:' + reset + space + \ profile.author + space + bold + 'Version:' + reset + space \ + profile.version) - - - - def print_action(self, module, action): - self.print_table([[bold + action.description + reset, '']]) - self.print_line('') - self.print_table(self.format_action(action)) def print_version(self, version): self.print_line(bold + 'Universal Profile Tool - ' \ |