Skip to content

Commit

Permalink
Merge pull request #32 from Aquaveo/python-3
Browse files Browse the repository at this point in the history
Run 2to3
  • Loading branch information
swainn authored Feb 19, 2019
2 parents 26f534d + f0219be commit 71afe75
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
# command to install dependencies
install:
# install htcondor
Expand Down
10 changes: 5 additions & 5 deletions condorpy/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(self,
attributes = attributes or OrderedDict()
attributes['job_name'] = name
attributes.update(kwargs)
for attr, value in attributes.items():
for attr, value in list(attributes.items()):
self.set(attr, value)

def __str__(self):
Expand Down Expand Up @@ -154,7 +154,7 @@ def status(self):
status_dict = self.statuses
# determine job status
status = "Various"
for key, val in status_dict.iteritems():
for key, val in status_dict.items():
if val == self.num_jobs:
status = key
return status
Expand Down Expand Up @@ -331,7 +331,7 @@ def quote_join_function_template(join_string, escape_func):
value = 'true'
elif isinstance(value, list) or isinstance(value, tuple):
join_function = join_function_template(', ', str)
for key in join_functions.keys():
for key in list(join_functions.keys()):
if attr.endswith(key):
join_function = join_functions[key]
value = join_function(value)
Expand Down Expand Up @@ -379,7 +379,7 @@ def _update_status(self, sub_job_num=None):

#initialize status dictionary
status_dict = dict()
for val in CONDOR_JOB_STATUSES.itervalues():
for val in CONDOR_JOB_STATUSES.values():
status_dict[val] = 0

for status_code_str in out:
Expand All @@ -395,7 +395,7 @@ def _update_status(self, sub_job_num=None):

def _list_attributes(self):
attribute_list = []
for k, v in self.attributes.items():
for k, v in list(self.attributes.items()):
if v:
attribute_list.append(k + ' = ' + str(v))
return attribute_list
Expand Down
2 changes: 1 addition & 1 deletion condorpy/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def list_vars(self):
result = ''
if self.vars:
result = 'VARS %s' % (self.job.name,)
for key, value in self.vars.iteritems():
for key, value in self.vars.items():
result += ' %s="%s"' % (key, value)
result += '\n'
return result
Expand Down
4 changes: 2 additions & 2 deletions condorpy/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __str__(self):

if self.max_jobs:
max_jobs_list = ''
for category, max_jobs in self.max_jobs.iteritems():
for category, max_jobs in self.max_jobs.items():
max_jobs_list += 'MAXJOBS {0} {1}\n'.format(category, str(max_jobs))
result.append(max_jobs_list)

Expand Down Expand Up @@ -184,7 +184,7 @@ def _update_statuses(self, sub_job_num=None):
# initialize status dictionary
status_dict = dict()

for val in CONDOR_JOB_STATUSES.itervalues():
for val in CONDOR_JOB_STATUSES.values():
status_dict[val] = 0

for node in self.node_set:
Expand Down
14 changes: 7 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
master_doc = 'index'

# General information about the project.
project = u'condorpy'
copyright = u'2015, Scott Christensen'
author = u'Scott Christensen'
project = 'condorpy'
copyright = '2015, Scott Christensen'
author = 'Scott Christensen'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -225,8 +225,8 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'condorpy.tex', u'condorpy Documentation',
u'Scott Christensen', 'manual'),
(master_doc, 'condorpy.tex', 'condorpy Documentation',
'Scott Christensen', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -255,7 +255,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'condorpy', u'condorpy Documentation',
(master_doc, 'condorpy', 'condorpy Documentation',
[author], 1)
]

Expand All @@ -269,7 +269,7 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'condorpy', u'condorpy Documentation',
(master_doc, 'condorpy', 'condorpy Documentation',
author, 'condorpy', 'One line description of project.',
'Miscellaneous'),
]
Expand Down

0 comments on commit 71afe75

Please sign in to comment.