Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
da6d8880
Commit
da6d8880
authored
Jul 13, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
65da1419
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
go/zodb/storage/zeo/zeo.go
go/zodb/storage/zeo/zeo.go
+7
-3
go/zodb/storage/zeo/zrpc.go
go/zodb/storage/zeo/zrpc.go
+1
-1
No files found.
go/zodb/storage/zeo/zeo.go
View file @
da6d8880
...
@@ -269,6 +269,7 @@ func (r rpc) excError(exc string, argv tuple) error {
...
@@ -269,6 +269,7 @@ func (r rpc) excError(exc string, argv tuple) error {
// XXX POSKeyError does not allow to distinguish whether it is
// XXX POSKeyError does not allow to distinguish whether it is
// no object at all or object exists and its data was not found
// no object at all or object exists and its data was not found
// for tid_before. IOW we cannot translate to zodb.NoDataError
// for tid_before. IOW we cannot translate to zodb.NoDataError
// https://github.com/zopefoundation/ZODB/issues/318
return
&
zodb
.
NoObjectError
{
Oid
:
oid
}
return
&
zodb
.
NoObjectError
{
Oid
:
oid
}
}
}
...
@@ -299,7 +300,10 @@ func (r rpc) zeo5Error(arg interface{}) error {
...
@@ -299,7 +300,10 @@ func (r rpc) zeo5Error(arg interface{}) error {
//
//
// nil is returned if arg does not represent an exception.
// nil is returned if arg does not represent an exception.
func
(
r
rpc
)
zeo4Error
(
arg
interface
{})
error
{
func
(
r
rpc
)
zeo4Error
(
arg
interface
{})
error
{
// XXX check r.zl.encoding == 'Z' before using pickles? XXX
// in msgpack encoding errors are always indicated via msgExcept flag.
if
r
.
zl
.
enc
!=
'Z'
{
return
nil
}
// (exc_class, exc_inst), e.g.
// (exc_class, exc_inst), e.g.
// ogórek.Tuple{
// ogórek.Tuple{
...
@@ -314,7 +318,7 @@ func (r rpc) zeo4Error(arg interface{}) error {
...
@@ -314,7 +318,7 @@ func (r rpc) zeo4Error(arg interface{}) error {
// }
// }
// }
// }
// }
// }
targ
,
ok
:=
arg
.
(
pickle
.
Tuple
)
// XXX -> asTuple
targ
,
ok
:=
arg
.
(
pickle
.
Tuple
)
if
!
ok
||
len
(
targ
)
!=
2
{
if
!
ok
||
len
(
targ
)
!=
2
{
return
nil
return
nil
}
}
...
@@ -355,7 +359,7 @@ func (r rpc) zeo4Error(arg interface{}) error {
...
@@ -355,7 +359,7 @@ func (r rpc) zeo4Error(arg interface{}) error {
argv
=
args
argv
=
args
}
}
return
r
.
excError
(
exc
,
tuple
(
argv
))
// XXX don't cast? XXX
return
r
.
excError
(
exc
,
tuple
(
argv
))
}
}
// isPyExceptClass returns whether klass represents python exception
// isPyExceptClass returns whether klass represents python exception
...
...
go/zodb/storage/zeo/zrpc.go
View file @
da6d8880
...
@@ -41,7 +41,7 @@ import (
...
@@ -41,7 +41,7 @@ import (
var
protoVersions
=
[]
string
{
var
protoVersions
=
[]
string
{
"3101"
,
// last in ZEO3 series
"3101"
,
// last in ZEO3 series
"4"
,
// no longer call load.
"4"
,
// no longer call load.
"5"
,
// current in ZEO5 series.
"5"
,
// current in ZEO5 series
(no serialnos, ...)
.
}
}
...
...
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