Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
ZEO
Commits
114dd15d
Commit
114dd15d
authored
Mar 08, 2013
by
Albertas Agejevas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix weird namespace behavior incompatibilities between Py2 and Py3.
parent
ae387e60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
src/ZEO/StorageServer.py
src/ZEO/StorageServer.py
+8
-5
No files found.
src/ZEO/StorageServer.py
View file @
114dd15d
...
@@ -602,7 +602,8 @@ class ZEOStorage:
...
@@ -602,7 +602,8 @@ class ZEOStorage:
self
.
storage
.
deleteObject
(
oid
,
serial
,
self
.
transaction
)
self
.
storage
.
deleteObject
(
oid
,
serial
,
self
.
transaction
)
except
(
SystemExit
,
KeyboardInterrupt
):
except
(
SystemExit
,
KeyboardInterrupt
):
raise
raise
except
Exception
as
err
:
except
Exception
as
e
:
err
=
e
self
.
_op_error
(
oid
,
err
,
'delete'
)
self
.
_op_error
(
oid
,
err
,
'delete'
)
return
err
is
None
return
err
is
None
...
@@ -614,7 +615,8 @@ class ZEOStorage:
...
@@ -614,7 +615,8 @@ class ZEOStorage:
oid
,
serial
,
self
.
transaction
)
oid
,
serial
,
self
.
transaction
)
except
(
SystemExit
,
KeyboardInterrupt
):
except
(
SystemExit
,
KeyboardInterrupt
):
raise
raise
except
Exception
as
err
:
except
Exception
as
e
:
err
=
e
self
.
_op_error
(
oid
,
err
,
'checkCurrentSerialInTransaction'
)
self
.
_op_error
(
oid
,
err
,
'checkCurrentSerialInTransaction'
)
return
err
is
None
return
err
is
None
...
@@ -669,7 +671,8 @@ class ZEOStorage:
...
@@ -669,7 +671,8 @@ class ZEOStorage:
tid
,
oids
=
self
.
storage
.
undo
(
trans_id
,
self
.
transaction
)
tid
,
oids
=
self
.
storage
.
undo
(
trans_id
,
self
.
transaction
)
except
(
SystemExit
,
KeyboardInterrupt
):
except
(
SystemExit
,
KeyboardInterrupt
):
raise
raise
except
Exception
as
err
:
except
Exception
as
e
:
err
=
e
self
.
_op_error
(
z64
,
err
,
'undo'
)
self
.
_op_error
(
z64
,
err
,
'undo'
)
else
:
else
:
self
.
invalidated
.
extend
(
oids
)
self
.
invalidated
.
extend
(
oids
)
...
@@ -681,12 +684,12 @@ class ZEOStorage:
...
@@ -681,12 +684,12 @@ class ZEOStorage:
# Try to pickle the exception. If it can't be pickled,
# Try to pickle the exception. If it can't be pickled,
# the RPC response would fail, so use something that can be pickled.
# the RPC response would fail, so use something that can be pickled.
if
PY3
:
if
PY3
:
pickler
=
Pickler
(
BytesIO
(),
1
)
pickler
=
Pickler
(
BytesIO
(),
3
)
else
:
else
:
pickler
=
Pickler
()
pickler
=
Pickler
()
pickler
.
fast
=
1
pickler
.
fast
=
1
try
:
try
:
pickler
.
dump
(
error
,
1
)
pickler
.
dump
(
error
)
except
:
except
:
msg
=
"Couldn't pickle storage exception: %s"
%
repr
(
error
)
msg
=
"Couldn't pickle storage exception: %s"
%
repr
(
error
)
self
.
log
(
msg
,
logging
.
ERROR
)
self
.
log
(
msg
,
logging
.
ERROR
)
...
...
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