Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
ca506a2b
Commit
ca506a2b
authored
Apr 27, 2001
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regex free
parent
10f67f11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
15 deletions
+4
-15
lib/python/ZPublisher/Client.py
lib/python/ZPublisher/Client.py
+4
-15
No files found.
lib/python/ZPublisher/Client.py
View file @
ca506a2b
...
...
@@ -103,9 +103,9 @@ that allows one to simply make a single web request.
The module also provides a command-line interface for calling objects.
"""
__version__
=
'$Revision: 1.4
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.4
2
$'
[
11
:
-
2
]
import
sys
,
re
gex
,
socket
,
mimetools
import
sys
,
re
,
socket
,
mimetools
from
httplib
import
HTTP
from
os
import
getpid
from
time
import
time
...
...
@@ -143,7 +143,7 @@ class Function:
if
timeout
is
not
None
:
self
.
timeout
=
timeout
mo
=
urlregex
.
match
(
url
)
if
mo
:
if
mo
is
not
None
:
host
,
port
,
rurl
=
mo
.
group
(
1
,
2
,
3
)
if
port
:
port
=
atoi
(
port
[
1
:])
else
:
port
=
80
...
...
@@ -347,7 +347,7 @@ def call(url,username=None, password=None, **kw):
##############################################################################
# Implementation details below here
urlregex
=
re
.
compile
(
'http://([^:/]+)(:[0-9]+)?(/.+)?'
,
re
.
I
)
urlregex
=
re
.
compile
(
r
'http://([^:/]+)(:[0-9]+)?(/.+)?'
,
re
.
I
)
dashtrans
=
maketrans
(
'_'
,
'-'
)
...
...
@@ -359,16 +359,6 @@ def marshal_long(n,f):
value
=
value
[:
-
1
]
return
value
sample_regex
=
regex
.
compile
(
''
)
def
marshal_regex
(
n
,
r
):
if
r
.
translate
is
sample_regex
.
translate
:
t
=
'Regex'
elif
r
.
translate
is
regex
.
casefold
:
t
=
'regex'
else
:
raise
ValueError
,
'regular expression used unsupported translation'
return
"%s:%s=%s"
%
(
n
,
t
,
quote
(
r
.
givenpat
))
def
marshal_list
(
n
,
l
,
tname
=
'list'
,
lt
=
type
([]),
tt
=
type
(())):
r
=
[]
for
v
in
l
:
...
...
@@ -386,7 +376,6 @@ type2marshal={
type
(
1.0
):
marshal_float
,
type
(
1
):
marshal_int
,
type
(
1L
):
marshal_long
,
type
(
regex
.
compile
(
''
)):
marshal_regex
,
type
([]):
marshal_list
,
type
(()):
marshal_tuple
,
}
...
...
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