Beispiel #1
0
                scheduler.force_res_id(int(opt_dict['--res_id']))
                print "WARNING: Forcing res id to %s" % opt_dict['--res_id']
            else:
                scheduler.set_res_id(int(opt_dict['--res_id']))
                print "Setting res id to %s" % opt_dict['--res_id']
        except ValueError:
            print "res_id must be set to an integer value."
            raise SystemExit, 1
        except xmlrpclib.Fault, flt:
            print flt.faultString
            raise SystemExit, 1
        
    if '--cycle_id' in opt_dict.keys():
        try:
            if force_id:
                scheduler.force_cycle_id(int(opt_dict['--cycle_id']))
                print "WARNING: Forcing cycle id to %s" % opt_dict['--cycle_id']
            else:
                scheduler.set_cycle_id(int(opt_dict['--cycle_id']))
                print "Setting cycle_id to %s" % opt_dict['--cycle_id']
        except ValueError:
            print "cycle_id must be set to an integer value."
            raise SystemExit, 1
        except xmlrpclib.Fault, flt:
            print flt.faultString
            raise SystemExit, 1

    if only_id_change:
        raise SystemExit, 0

    if '-f' not in sys.argv:
Beispiel #2
0
                scheduler.force_res_id(int(opt_dict['--res_id']))
                print "WARNING: Forcing res id to %s" % opt_dict['--res_id']
            else:
                scheduler.set_res_id(int(opt_dict['--res_id']))
                print "Setting res id to %s" % opt_dict['--res_id']
        except ValueError:
            print "res_id must be set to an integer value."
            raise SystemExit, 1
        except xmlrpclib.Fault, flt:
            print flt.faultString
            raise SystemExit, 1

    if '--cycle_id' in opt_dict.keys():
        try:
            if force_id:
                scheduler.force_cycle_id(int(opt_dict['--cycle_id']))
                print "WARNING: Forcing cycle id to %s" % opt_dict['--cycle_id']
            else:
                scheduler.set_cycle_id(int(opt_dict['--cycle_id']))
                print "Setting cycle_id to %s" % opt_dict['--cycle_id']
        except ValueError:
            print "cycle_id must be set to an integer value."
            raise SystemExit, 1
        except xmlrpclib.Fault, flt:
            print flt.faultString
            raise SystemExit, 1

    if only_id_change:
        raise SystemExit, 0

    if '-f' not in sys.argv: