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
c671fd84
Commit
c671fd84
authored
Dec 27, 2003
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused imports and local variables.
parent
a1b917f6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
13 deletions
+6
-13
lib/python/webdav/EtagSupport.py
lib/python/webdav/EtagSupport.py
+2
-2
lib/python/webdav/Resource.py
lib/python/webdav/Resource.py
+1
-4
lib/python/webdav/davcmds.py
lib/python/webdav/davcmds.py
+2
-5
lib/python/webdav/xmltools.py
lib/python/webdav/xmltools.py
+1
-2
No files found.
lib/python/webdav/EtagSupport.py
View file @
c671fd84
...
@@ -11,10 +11,10 @@
...
@@ -11,10 +11,10 @@
#
#
##############################################################################
##############################################################################
__version__
=
"$Revision: 1.1
0
$"
[
11
:
-
2
]
__version__
=
"$Revision: 1.1
1
$"
[
11
:
-
2
]
import
time
,
Interface
,
re
import
time
,
Interface
from
webdav.common
import
PreconditionFailed
from
webdav.common
import
PreconditionFailed
class
EtagBaseInterface
(
Interface
.
Base
):
class
EtagBaseInterface
(
Interface
.
Base
):
...
...
lib/python/webdav/Resource.py
View file @
c671fd84
...
@@ -13,10 +13,9 @@
...
@@ -13,10 +13,9 @@
"""WebDAV support - resource objects.
"""WebDAV support - resource objects.
$Id: Resource.py,v 1.5
8 2003/11/18 13:17:20 tseaver
Exp $
$Id: Resource.py,v 1.5
9 2003/12/27 00:05:48 jeremy
Exp $
"""
"""
import
os
import
sys
import
sys
import
mimetypes
import
mimetypes
import
time
import
time
...
@@ -317,7 +316,6 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
...
@@ -317,7 +316,6 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
raise
BadRequest
,
'Invalid Destination header'
raise
BadRequest
,
'Invalid Destination header'
name
=
path
.
pop
()
name
=
path
.
pop
()
parent_path
=
'/'
.
join
(
path
)
oflag
=
REQUEST
.
get_header
(
'Overwrite'
,
'F'
).
upper
()
oflag
=
REQUEST
.
get_header
(
'Overwrite'
,
'F'
).
upper
()
if
not
oflag
in
(
'T'
,
'F'
):
if
not
oflag
in
(
'T'
,
'F'
):
...
@@ -558,7 +556,6 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
...
@@ -558,7 +556,6 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
"""Remove an existing lock on a resource."""
"""Remove an existing lock on a resource."""
self
.
dav__init
(
REQUEST
,
RESPONSE
)
self
.
dav__init
(
REQUEST
,
RESPONSE
)
security
=
getSecurityManager
()
security
=
getSecurityManager
()
user
=
security
.
getUser
()
token
=
REQUEST
.
get_header
(
'Lock-Token'
,
''
)
token
=
REQUEST
.
get_header
(
'Lock-Token'
,
''
)
url
=
REQUEST
[
'URL'
]
url
=
REQUEST
[
'URL'
]
token
=
tokenFinder
(
token
)
token
=
tokenFinder
(
token
)
...
...
lib/python/webdav/davcmds.py
View file @
c671fd84
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
"""WebDAV xml request objects.
"""WebDAV xml request objects.
$Id: davcmds.py,v 1.2
2 2003/11/18 13:17:20 tseaver
Exp $
$Id: davcmds.py,v 1.2
3 2003/12/27 00:05:48 jeremy
Exp $
"""
"""
import
sys
,
os
import
sys
,
os
...
@@ -246,7 +246,6 @@ class PropPatch:
...
@@ -246,7 +246,6 @@ class PropPatch:
if
propset
is
None
:
if
propset
is
None
:
propsets
.
manage_addPropertySheet
(
''
,
ns
)
propsets
.
manage_addPropertySheet
(
''
,
ns
)
propset
=
propsets
.
get
(
ns
)
propset
=
propsets
.
get
(
ns
)
propdict
=
propset
.
_propdict
()
if
propset
.
hasProperty
(
name
):
if
propset
.
hasProperty
(
name
):
try
:
try
:
propset
.
_updateProperty
(
name
,
val
,
meta
=
md
)
propset
.
_updateProperty
(
name
,
val
,
meta
=
md
)
...
@@ -272,8 +271,6 @@ class PropPatch:
...
@@ -272,8 +271,6 @@ class PropPatch:
except
:
except
:
errors
.
append
(
'%s cannot be deleted.'
%
name
)
errors
.
append
(
'%s cannot be deleted.'
%
name
)
status
=
'409 Conflict'
status
=
'409 Conflict'
if
result
!=
'200 OK'
:
abort
=
1
result
.
write
(
'<d:propstat xmlns:n="%s">
\
n
'
\
result
.
write
(
'<d:propstat xmlns:n="%s">
\
n
'
\
' <d:prop>
\
n
'
\
' <d:prop>
\
n
'
\
' <n:%s/>
\
n
'
\
' <n:%s/>
\
n
'
\
...
@@ -360,7 +357,7 @@ class Lock:
...
@@ -360,7 +357,7 @@ class Lock:
if
token
is
None
:
if
token
is
None
:
token
=
lock
.
getLockToken
()
token
=
lock
.
getLockToken
()
except
ValueError
,
valerrors
:
except
ValueError
:
errmsg
=
"412 Precondition Failed"
errmsg
=
"412 Precondition Failed"
except
:
except
:
errmsg
=
"403 Forbidden"
errmsg
=
"403 Forbidden"
...
...
lib/python/webdav/xmltools.py
View file @
c671fd84
...
@@ -17,9 +17,8 @@
...
@@ -17,9 +17,8 @@
in favor of a standard xml package once some issues are
in favor of a standard xml package once some issues are
worked out."""
worked out."""
__version__
=
'$Revision: 1.1
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
6
$'
[
11
:
-
2
]
import
sys
,
os
import
Shared.DC.xml.xmllib
import
Shared.DC.xml.xmllib
from
Acquisition
import
Implicit
from
Acquisition
import
Implicit
...
...
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