'Parse and return global options. This method will silently return None
if any errors are encountered during parsing.'

def get_global_opts(self):

    gparser = self.create_global_parser(no_usage=True, add_help=False)
    try:
        sys.stdout = open(os.devnull, 'w')
        sys.stderr = open(os.devnull, 'w')
        (gopts, _) = gparser.parse_args()
        return gopts
    except SystemExit:
        pass
    finally:
        sys.stdout = sys.__stdout__
        sys.stderr = sys.__stderr__
