History | View | Annotate | Download (5.8 kB)
Convert ListOS to use the all helper function.
The predicate function gets build by a lambda function.Also add a bit of debugging information to the 'unknown OS diagnose type'.
Reviewed-by: iustinp
Make “gnt-os diagnose” exit 1 if not all OSes are valid.
Reorder gnt-os simplify _GetAllOS and call it _DiagnoseByOS
Put some order in gnt-os putting helper functions above and command functionsbelow. Also add a new _DiagnoseOSName() function and use it to make _GetAllOSsimplier to understand. Change its name to _DiagnoseByOS which makes more clear...
Fix ListOS which was broken
To do this we abstract the creation of the all_os dictionary, which wasproduced in DiagnoseOS and use it both for listing and diagnosing.
Refactor DiagnoseOS
The new version debugs Hidden OSes as well.
Ship (and display) path for InvalidOS errors too.
- Document the expected change to errors.InvalidOS- Always pass the additional argument- Modify DiagnoseOS output to show the path
Reviewed-by: iustinp, imsnah
Fix OS Diagnose in light of the new OS Search path (Part One).
As of now only the last OS was taken into consideration by diagnose, fix bystoring them all and displaying for now only the first. Also display the sourcepath for valid OSes.
Reviewed-by: imsnah
Change cli.OutputTable to cli.GenerateTable
Since the table generation might be useful elsewhere, let's change it toreturn the data instead of directly printing it.
Its callers have also been updated.
Style changes for pep-8 and python-3000 compliance.
This changes the raising of exceptions from: raise Exception, valueto raise Exception(value)
as the first form will be removed in python-3000 and the second form ispreferred now.
The changes also involve a few cases of changing from raising standard...
Use OutputTable for “gnt-os list”.
Initial commit.