Skip to content

Commit

Permalink
Fix python3 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres Tanasijczuk authored and CP3 Support committed Jun 2, 2021
1 parent 7147558 commit f9a7d5f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/SlurmDagman/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env python

__version__ = "0.1.2"
__version__ = "0.1.3"
2 changes: 1 addition & 1 deletion lib/SlurmDagman/config/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def set_params(self, params):
def set_param(self, section, option, value):
if not self.config.has_section(section):
self.config.add_section(section)
self.config.set(section, option, value)
self.config.set(section, option, str(value))


def get_params(self, sections_and_options=None):
Expand Down
4 changes: 2 additions & 2 deletions lib/SlurmDagman/dag/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def reset_node(self, node):


def get_nodes(self):
return self.dag.keys()
return list(self.dag.keys())


def parse(self):
Expand Down Expand Up @@ -205,7 +205,7 @@ def write(self, dag_file='', use_dag_nodes_appearance_order=False, add_done_labe
if use_dag_nodes_appearance_order and self.dag_nodes_appearance_order:
nodes = sorted(self.dag_nodes_appearance_order, key=self.dag_nodes_appearance_order.get)
else:
nodes = self.dag.keys()
nodes = self.get_nodes()
jobs_lines = []
for node in nodes:
job_line = 'JOB %s %s' % (node, self.dag[node]['job_submission_file'])
Expand Down
4 changes: 2 additions & 2 deletions lib/SlurmDagman/process/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def __parse_process_config(self, log_changes=True):
# type.) In case of such a failure, we get None for that parameter;
# so we have to handle the case of a parameter being None. Finally,
# we will return True if there is no None parameter and False otherwise.
params = self.__get_process_config_params().values()
params = list(self.__get_process_config_params().values())
sleep_time, max_jobs_queued, max_jobs_submit, submit_wait_time, \
drain, cancel \
= params[:]
Expand Down Expand Up @@ -270,7 +270,7 @@ def __pre_execute_dag(self):


def __pre_write_dag(self):
for node in copy.copy(self.dag_done.keys()):
for node in list(self.dag_done.keys()):
if node not in self.dag:
self.dag[node] = copy.deepcopy(self.dag_done[node])
else:
Expand Down

0 comments on commit f9a7d5f

Please sign in to comment.