avocado.utils.misc: Remove unique function

The presence of a misc module encourages dumping functions
there without thought to better module names to put them
on. Let's remove the unique function since it can be
expressed by the combination of 2 native python types,
should the need arise.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.utils.misc: Remove get_relative_path

That function is not used in the avocado code base, and
it is superseded by standard library function
os.path.relpath().

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.utils.misc: Remove unused part of read_file() implementation

That part is not going to be executed anyway. It's probably
a leftover from previous iterations.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.utils.misc: Improve function docstrings

Also, reorder write_file and write_one_line.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
utils: Rename misc to io

Having 'misc' libraries tends to encourage people to
dump random functions without much thought as to
their location. Let's rename 'misc' to 'io'.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.utils: Straighten up internal imports

It is nice to be able to refer to modules using the
dot notation. This fixes some missing imports in the
avocado.utils module, as well as it removes unused
ones.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.utils: Add path submodule

Add a module for path related operations in avocado.utils.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado: Use avocado.utils.path.init_dir in dir init operations

It saves quite a lot of code, since this is such a common
operation in avocado.

I'd like to have the reviewer to give a good thought of
whether this is a good solution or not (I think it is,
although API names and such could be better thought off).

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.job: Get rid of timeout in Queue.get() call

The timeout there is unnecessary and introduces races.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #119 from lmr/avocado-utils-work

Avocado utils work