# Path: servi/command.py
# class Command(object):
#     def __init__(self):
#         self.special = {
#             "skip_init": False,
#             "parse_known_args": False
#         }
# 
#     def register_command_line(self, sub_parser):
#         pass
# 
#     def run(self, args, extra_args):
#         pass
# 
# Path: servi/utils.py
# @contextmanager
# def timeit():
#     t0 = datetime.now()
#     yield
#     t1 = datetime.now()
#     info('Total running time: {0:.1f} min'.format((t1 - t0).seconds / 60))
# 
# Path: servi/exceptions.py
# class ServiError(Exception):
#     # Expected errrors. Handle gracefully (ie: no stack dump)
#     def __init__(self, msg=None):
#         self.msg = msg
# 
#     def __str__(self):
#         return (
#             '\n***** ERROR *****\n'
#             '{0}\n'
#             '\n**Servi Aborting**'.format(self.msg))


import subprocess
import os
import sys
import servi.config as c
from logging import info
from servi.command import Command
from servi.utils import timeit
from servi.exceptions import ServiError



def get_servi_inventory_path():
    try:
        servi_inventory = \
            subprocess.check_output('which servi_inventory', shell=True,
                                    universal_newlines=True)
    except subprocess.CalledProcessError:

# Path: servi/command.py
# class Command(object):
#     def __init__(self):
#         self.special = {
#             "skip_init": False,
#             "parse_known_args": False
#         }
# 
#     def register_command_line(self, sub_parser):
#         pass
# 
#     def run(self, args, extra_args):
#         pass
# 
# Path: servi/utils.py
# @contextmanager
# def timeit():
#     t0 = datetime.now()
#     yield
#     t1 = datetime.now()
#     info('Total running time: {0:.1f} min'.format((t1 - t0).seconds / 60))
# 
# Path: servi/exceptions.py
# class ServiError(Exception):
#     # Expected errrors. Handle gracefully (ie: no stack dump)
#     def __init__(self, msg=None):
#         self.msg = msg
# 
#     def __str__(self):
#         return (
#             '\n***** ERROR *****\n'
#             '{0}\n'
#             '\n**Servi Aborting**'.format(self.msg))


# Path: servi/commands/lans.py
import subprocess
import os
import sys
import servi.config as c
from logging import info
from servi.command import Command
from servi.utils import timeit
from servi.exceptions import ServiError




def get_servi_inventory_path():
    try:
        servi_inventory = \
            subprocess.check_output('which servi_inventory', shell=True,
                                    universal_newlines=True)
    except subprocess.CalledProcessError:

        raise ServiError("Couldn't find servi_inventory script on path.\n"