Merge pull request #136 from ros/rostopic_pub_complete_with_options
rostopic pub autocomplete's works when options are provided
a7feabd...
by
Kazumi Malhan <email address hidden>
Added --size option to rosclean purge (#126)
* Added size option to rosclean purge.
When --size option is specified, it will delete old log files until log
directory reaches specified size (in MB), but never below specified
size. Otherwise, it will delete everything inside log directory.
* Changed help message and restored deleted comment.
* Cleaned up the patch to reflect comments.
* Updated functions based on comments.
- Fixed typo
- Removed _check_user_input and check_delete_file_size functions
* Changed logic from keeping minimum to keeping maximum.
* remove unnecessary parenthesis
* check size before asking, use 1024 instead of 1000
This except-and-raise pattern hides the actual error messages and leaves
us with a generic string "cannot create test results..." instead.
This makes it much harder to track down bugs.
On the other hand the exception text "[Errno 13] Permission denied: 'foobar'"
alone does not tell you that "foobar" is supposed to be the directory for the
tests results.
Thus I fused both exception texts. Because the error message in case of
missing permissions is (given above) "Permission denied", I removed the
"Please check permissions." hint.