@@ -30,7 +30,8 @@ from pyslurm.utils.uint import *
3030from pyslurm.core.error import RPCError, verify_rpc
3131from pyslurm.utils.ctime import timestamp_to_date, _raw_time
3232from pyslurm.constants import UNLIMITED
33- from pyslurm.settings import LOCAL_CLUSTER
33+ from pyslurm import settings
34+ from pyslurm.core import slurmctld
3435from pyslurm.core.slurmctld.config import _get_memory
3536from pyslurm import xcollections
3637from pyslurm.utils.helpers import (
@@ -78,7 +79,6 @@ cdef class Partitions(MultiClusterMap):
7879 Partitions partitions = Partitions()
7980 int flags = slurm.SHOW_ALL
8081 Partition partition
81- slurmctld.Config slurm_conf
8282 int power_save_enabled = 0
8383
8484 verify_rpc(slurm_load_partitions(0 , & partitions.info, flags))
@@ -168,7 +168,7 @@ cdef class Partition:
168168 def __init__ (self , name = None , **kwargs ):
169169 self ._alloc_impl()
170170 self .name = name
171- self .cluster = LOCAL_CLUSTER
171+ self .cluster = settings. LOCAL_CLUSTER
172172 for k, v in kwargs.items():
173173 setattr (self , k, v)
174174
@@ -194,7 +194,7 @@ cdef class Partition:
194194 cdef Partition from_ptr(partition_info_t * in_ptr):
195195 cdef Partition wrap = Partition.__new__ (Partition)
196196 wrap._alloc_impl()
197- wrap.cluster = LOCAL_CLUSTER
197+ wrap.cluster = settings. LOCAL_CLUSTER
198198 memcpy(wrap.ptr, in_ptr, sizeof(partition_info_t))
199199 return wrap
200200
@@ -801,7 +801,7 @@ def _preempt_mode_str_to_int(mode):
801801 return pmode
802802
803803
804- def _preempt_mode_int_to_str (mode , slurmctld.Config slurm_conf ):
804+ def _preempt_mode_int_to_str (mode , slurm_conf ):
805805 if mode == slurm.NO_VAL16:
806806 return slurm_conf.preempt_mode if slurm_conf else None
807807 else :
0 commit comments