#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#
import sys
import gettext
import getopt
import locale
import logging
import os
import pkg
"""Simple subclass to ignore exceptions raised during logging output."""
return
ips_logger = None
"""Create error message."""
def __init_log():
"""Initialize logger."""
global ips_logger
# If this script is used in RAD, only retrieve log levels <= INFO.
def main_func():
pkg_image = None
pargs_json = None
opts_json = None
return error(_("This script can only be invoked by RAD"))
try:
"hR:?", ["help", "pargs=", "opts=", "prog-delay="])
error("This is a RAD only script.")
elif opt == "--pargs":
elif opt == "--opts":
elif opt == "-R":
elif opt == "--prog-delay":
else:
error(_("unknown option {0} in file: {1}"
except getopt.GetoptError as e:
return error(_("illegal global option -- {0} in file: {1}"
except ValueError as e:
return error(_("invalid option argument: {0} in file: {1}"
if __name__ == "__main__":
try:
except IOError:
# Ignore python's spurious pipe problems.
pass