api: whitespaces fixes
No semantic change, just more spaces between functions to make it more PEP-8 compliant.
This commit is contained in:
parent
938f2e0ba8
commit
78d72eded9
1 changed files with 3 additions and 0 deletions
|
|
@ -202,6 +202,7 @@ class API(BaseAPI):
|
|||
os.close(self._output_pipe)
|
||||
self._output_pipe = None
|
||||
|
||||
|
||||
def exception(e, path="/run/osbuild/api/osbuild"):
|
||||
"""Send exception to osbuild"""
|
||||
traceback.print_exception(type(e), e, e.__traceback__, file=sys.stderr)
|
||||
|
|
@ -218,6 +219,7 @@ def exception(e, path="/run/osbuild/api/osbuild"):
|
|||
|
||||
sys.exit(2)
|
||||
|
||||
|
||||
# pylint: disable=broad-except
|
||||
@contextlib.contextmanager
|
||||
def exception_handler(path="/run/osbuild/api/osbuild"):
|
||||
|
|
@ -226,6 +228,7 @@ def exception_handler(path="/run/osbuild/api/osbuild"):
|
|||
except Exception as e:
|
||||
exception(e, path)
|
||||
|
||||
|
||||
def arguments(path="/run/osbuild/api/osbuild"):
|
||||
"""Retrieve the input arguments that were supplied to API"""
|
||||
with jsoncomm.Socket.new_client(path) as client:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue