Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic_graph_bridge
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Guilhem Saurel
dynamic_graph_bridge
Commits
8c259d14
Commit
8c259d14
authored
9 years ago
by
olivier stasse
Browse files
Options
Downloads
Plain Diff
Merge pull request #28 from gergondet/topic/ImproveRunCommand
Improve run_command script handling
parents
d17639e1
94465e97
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/run_command
+10
-7
10 additions, 7 deletions
scripts/run_command
with
10 additions
and
7 deletions
scripts/run_command
+
10
−
7
View file @
8c259d14
...
...
@@ -70,6 +70,7 @@ class RosShell(InteractiveConsole):
if
__name__
==
'
__main__
'
:
import
optparse
import
os.path
manifest
=
roslib
.
manifest
.
load_manifest
(
'
dynamic_graph_bridge
'
)
rospy
.
init_node
(
'
run_command
'
,
argv
=
sys
.
argv
)
sys
.
argv
=
rospy
.
myargv
(
argv
=
None
)
...
...
@@ -82,12 +83,14 @@ if __name__ == '__main__':
if
args
[:]:
infile
=
args
[
0
]
source
=
open
(
infile
).
read
()
if
not
sh
.
client
:
print
(
"
Connection to remote server has been lost.
"
)
sys
.
exit
(
1
)
response
=
sh
.
scriptClient
(
infile
)
if
not
response
:
print
(
"
Error while file parsing
"
)
if
os
.
path
.
isfile
(
infile
):
if
not
sh
.
client
:
print
(
"
Connection to remote server has been lost.
"
)
sys
.
exit
(
1
)
response
=
sh
.
scriptClient
(
os
.
path
.
abspath
(
infile
))
if
not
response
:
print
(
"
Error while file parsing
"
)
else
:
print
(
"
Provided file does not exist: %s
"
%
(
infile
))
else
:
sh
.
interact
(
"
Interacting with remote server.
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment