Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pcl-expect
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Per Cederqvist
pcl-expect
Commits
3c30be62
Commit
3c30be62
authored
21 years ago
by
Per Cederqvist
Browse files
Options
Downloads
Patches
Plain Diff
(spawn.__init__): Use basestring instead of types.StringTypes.
(impl.re): Ditto.
parent
0e3d5aeb
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
pcl_expect.py
+2
-3
2 additions, 3 deletions
pcl_expect.py
with
2 additions
and
3 deletions
pcl_expect.py
+
2
−
3
View file @
3c30be62
...
@@ -7,7 +7,6 @@ import select
...
@@ -7,7 +7,6 @@ import select
import
sets
import
sets
import
sys
import
sys
import
telnetlib
import
telnetlib
import
types
#
#
# Global variables. The user are supposed to change these.
# Global variables. The user are supposed to change these.
...
@@ -115,7 +114,7 @@ class spawn(expectable):
...
@@ -115,7 +114,7 @@ class spawn(expectable):
settings
=
f
.
read
()
settings
=
f
.
read
()
f
.
close
()
f
.
close
()
if
isinstance
(
cmd
,
types
.
StringTypes
):
if
isinstance
(
cmd
,
basestring
):
cmd
=
cmd
.
split
(
"
"
)
cmd
=
cmd
.
split
(
"
"
)
(
r
,
w
)
=
os
.
pipe
()
(
r
,
w
)
=
os
.
pipe
()
set_cloexec_flag
(
w
)
set_cloexec_flag
(
w
)
...
@@ -268,7 +267,7 @@ class impl:
...
@@ -268,7 +267,7 @@ class impl:
# Doing this compilation again and again could be a problem.
# Doing this compilation again and again could be a problem.
# I rely on the cache in module re. I hope it exists...
# I rely on the cache in module re. I hope it exists...
if
isinstance
(
regexp
,
types
.
StringTypes
):
if
isinstance
(
regexp
,
basestring
):
regexp
=
re
.
compile
(
regexp
)
regexp
=
re
.
compile
(
regexp
)
match
=
regexp
.
search
(
exp
.
buffer
())
match
=
regexp
.
search
(
exp
.
buffer
())
...
...
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