# Path: HPCStats/Exceptions.py
# class HPCStatsArgumentException(HPCStatsException):
# 
#     """Class for argument parsing exceptions in HPCStats"""
# 
#     def __init__(self, msg):
# 
#         super(HPCStatsArgumentException, self).__init__(msg)


import argparse
from HPCStats.Exceptions import HPCStatsArgumentException
                                dest='domain_name',
                                nargs=1,
                                help="The name of the domain to create" )

    def parse_args(self, *args, **kwargs):

        """Call parent class parse_args() method and do more specifics
           arguments coherency checks.
        """

        args = super(HPCStatsArgumentParser, self).parse_args(*args, **kwargs)

        if args.action == 'import':

            # If the --since-* arguments are specified on command line, the
            # argparse module returns the values inside a list. Since nargs=1
            # the value is pop'ed here to get the value directly, and use it
            # whatever the default or user value is used.
            if type(args.since_event) is list:
                args.since_event = args.since_event.pop()

            if type(args.since_jobid) is list:
                args.since_jobid = args.since_jobid.pop()

        elif args.action == 'modify':

            # Check that either --business-code, --project-code or --new-domain
            # is set
            if args.business is None and args.project is None and \
               args.new_domain is None:

# Path: HPCStats/Exceptions.py
# class HPCStatsArgumentException(HPCStatsException):
# 
#     """Class for argument parsing exceptions in HPCStats"""
# 
#     def __init__(self, msg):
# 
#         super(HPCStatsArgumentException, self).__init__(msg)


# Path: HPCStats/CLI/HPCStatsArgumentParser.py
import argparse
from HPCStats.Exceptions import HPCStatsArgumentException

                                dest='domain_name',
                                nargs=1,
                                help="The name of the domain to create" )

    def parse_args(self, *args, **kwargs):

        """Call parent class parse_args() method and do more specifics
           arguments coherency checks.
        """

        args = super(HPCStatsArgumentParser, self).parse_args(*args, **kwargs)

        if args.action == 'import':

            # If the --since-* arguments are specified on command line, the
            # argparse module returns the values inside a list. Since nargs=1
            # the value is pop'ed here to get the value directly, and use it
            # whatever the default or user value is used.
            if type(args.since_event) is list:
                args.since_event = args.since_event.pop()

            if type(args.since_jobid) is list:
                args.since_jobid = args.since_jobid.pop()

        elif args.action == 'modify':

            # Check that either --business-code, --project-code or --new-domain
            # is set
            if args.business is None and args.project is None and \
               args.new_domain is None:

                raise HPCStatsArgumentException( \