示例#1
0
        jsonMsg = {}
        jsonMsg['status'] = "error"
        jsonMsg['msg'] = p_msg
        print(json.dumps([jsonMsg]))
    else:
        print(p_msg)
    sys.exit(1)
    return


#######################################################
##                     MAINLINE                      ##
#######################################################
pgver = "pg9X"

app_datadir = util.get_comp_datadir(pgver)
update_install_date = False
if app_datadir == "":
    update_install_date = True

parser = argparse.ArgumentParser()
parser.add_argument("--datadir", type=str, default="")
parser.add_argument("--svcuser", type=str, default="")
parser.add_argument("--port", type=int, default=0)
parser.add_argument("--options", type=str, default="")
parser.add_argument("--pwfile", type=str, default="")
args = parser.parse_args()

isSilent = os.getenv("isSilent", None)

## Initialize the ConsoleLogger to redirect the console output log file
示例#2
0
        jsonMsg['status'] = "error"
        jsonMsg['msg'] = p_msg
        print(json.dumps([jsonMsg]))
    else:
        print(p_msg)
    sys.exit(1)
    return


#######################################################
##                     MAINLINE                      ##
#######################################################

isJson = os.getenv("isJson", None)

app_datadir = util.get_comp_datadir("pgadmin")
update_install_date = False
if app_datadir == "":
    update_install_date = True

parser = argparse.ArgumentParser()
parser.add_argument("--datadir", type=str, default="")
parser.add_argument("--port", type=int, default=80)
parser.add_argument("--pwfile", type=str, default="")
parser.add_argument("--email", type=str, default="")
args = parser.parse_args()

isSilent = os.getenv("isSilent", None)

## Initialize the ConsoleLogger to redirect the console output log file
previous_stdout = sys.stdout