Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gridtk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
gridtk
Commits
4f6221ca
Commit
4f6221ca
authored
Aug 20, 2013
by
André Anjos
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[python3] string class comparison using six
parent
a38da01f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
gridtk/setshell.py
gridtk/setshell.py
+2
-1
gridtk/tools.py
gridtk/tools.py
+2
-2
No files found.
gridtk/setshell.py
View file @
4f6221ca
...
...
@@ -8,6 +8,7 @@
import
os
import
sys
import
six
import
signal
import
subprocess
from
.tools
import
logger
...
...
@@ -88,7 +89,7 @@ def environ(context):
def
sexec
(
context
,
command
,
error_on_nonzero
=
True
):
"""Executes a command within a particular Idiap SETSHELL context"""
if
isinstance
(
context
,
(
str
,
unicode
)
):
E
=
environ
(
context
)
if
isinstance
(
context
,
six
.
string_types
):
E
=
environ
(
context
)
else
:
E
=
context
try
:
...
...
gridtk/tools.py
View file @
4f6221ca
...
...
@@ -139,7 +139,7 @@ def qsub(command, queue=None, cwd=True, name=None, deps=[], stdout='',
scmd = ['
qsub
']
if isinstance(queue, s
tr
) and queue not in ('
all
.
q
', '
default
'):
if isinstance(queue, s
ix.string_types
) and queue not in ('
all
.
q
', '
default
'):
scmd += ['
-
l
', queue]
if mem:
...
...
@@ -195,7 +195,7 @@ def qsub(command, queue=None, cwd=True, name=None, deps=[], stdout='',
except ValueError:
#must be complete...
scmd.append('
%
s
' % array)
if isinstance(array,
(int, long)
):
if isinstance(array,
six.integer_types
):
scmd.append('
1
-%
d
:
1
' % array)
if isinstance(array, (tuple, list)):
if len(array) < 1 or len(array) > 3:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment