autotest/autotest — pull request #781 by rbbratta (2014-01-02 21:57:02+00:00)
Title: autotest_firewalld_add_service_unittest: add proper wrapper to preserve sys.dont_write_bytecode value

autopep8 fixes, and os.path.join for path constants.

**autotest_firewalld_add_service_unittest: add proper wrapper to preserve sys.dont_write_bytecode value**

To be more proper we should save and reset the value of
`sys.dont_write_bytecode` since it is a global system value.

We need to set dont_write_bytecode because if we don't when we
load a module from a file 'foo', python will write the bytecode to 'fooc',
or in this test case 'autotest-firewalld-add-servicec'

This function decorator is adapted from the original context manger from
http://stackoverflow.com/a/6811921
We have to use a function decorator since Python 2.4 doesn't have
context managers.

Eventually preserve_value should probably extracted and placed in
client/shared for use with importing and unittest 'control' files.

Signed-off-by: Ross Brattain