Skip to content

Commit e79981c

Browse files
authored
20.11.8 fixups (#220)
* refactor: Removed old python2 unicode string tags * bug: Corrected os.getcwd typo
1 parent 4b60f4d commit e79981c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

examples/slurm_node_xml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def meminfo():
103103
"--dir",
104104
dest="directory",
105105
action="store",
106-
default=os.getcwd,
106+
default=os.getcwd(),
107107
help="Directory to write data to",
108108
)
109109
parser.add_argument(

pyslurm/slurm.pxd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4250,7 +4250,7 @@ cdef inline listOrNone(char* value, sep_char):
42504250
if not sep_char:
42514251
return value.decode("UTF-8", "replace")
42524252

4253-
if sep_char == b'':
4253+
if sep_char == '':
42544254
return value.decode("UTF-8", "replace")
42554255

42564256
return value.decode("UTF_8", "replace").split(sep_char)
@@ -4260,8 +4260,8 @@ cdef inline stringOrNone(char* value, value2):
42604260
if value is NULL:
42614261
if value2 is '':
42624262
return None
4263-
return u"%s" % value2
4264-
return u"%s" % value.decode("UTF-8", "replace")
4263+
return value2
4264+
return value.decode("UTF-8", "replace")
42654265

42664266

42674267
cdef inline int16orNone(uint16_t value):
@@ -4290,7 +4290,7 @@ cdef inline int16orUnlimited(uint16_t value, return_type):
42904290
if return_type is "int":
42914291
return None
42924292
else:
4293-
return u"UNLIMITED"
4293+
return "UNLIMITED"
42944294
else:
42954295
if return_type is "int":
42964296
return value
@@ -4300,8 +4300,8 @@ cdef inline int16orUnlimited(uint16_t value, return_type):
43004300

43014301
cdef inline boolToString(int value):
43024302
if value == 0:
4303-
return u'False'
4304-
return u'True'
4303+
return 'False'
4304+
return 'True'
43054305

43064306

43074307
cdef extern char **environ

0 commit comments

Comments
 (0)