Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
5d604d32
Commit
5d604d32
authored
Oct 02, 2003
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused imports and reorganize import block.
parent
b71f62f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
18 deletions
+16
-18
src/ZODB/Transaction.py
src/ZODB/Transaction.py
+16
-18
No files found.
src/ZODB/Transaction.py
View file @
5d604d32
...
...
@@ -13,17 +13,16 @@
##############################################################################
"""Transaction management
$Id: Transaction.py,v 1.5
0 2003/10/02 18:17:19
jeremy Exp $
$Id: Transaction.py,v 1.5
1 2003/10/02 20:17:36
jeremy Exp $
"""
import
sys
import
time
,
sys
,
struct
,
POSException
from
string
import
split
,
strip
,
join
from
zLOG
import
LOG
,
ERROR
,
PANIC
,
INFO
,
BLATHER
,
WARNING
from
POSException
import
Conflict
Error
from
utils
import
oid_repr
from
ZODB.POSException
import
ConflictError
,
Transaction
Error
from
ZODB.
utils
import
oid_repr
# Flag indicating whether certain errors have occurred.
hosed
=
0
hosed
=
0
# There is an order imposed on all jars, based on the storages they
# serve, that must be consistent across all applications using the
...
...
@@ -101,7 +100,7 @@ class Transaction:
entered two-phase commit yet, so no tpc_ messages are sent.
"""
if
subtransaction
and
(
self
.
_non_st_objects
is
not
None
):
raise
POSException
.
TransactionError
,
(
raise
TransactionError
(
"""Attempted to abort a sub-transaction, but a participating
data manager doesn't support partial abort.
"""
)
...
...
@@ -169,9 +168,9 @@ class Transaction:
if
self
.
_objects
:
self
.
abort
(
subtransaction
,
0
)
if
info
:
info
=
split
(
info
,
'
\
t
'
)
self
.
user
=
strip
(
info
[
0
]
)
self
.
description
=
strip
(
join
(
info
[
1
:],
'
\
t
'
)
)
L
=
info
.
split
(
"
\
t
"
)
self
.
user
=
L
[
0
].
strip
(
)
self
.
description
=
"
\
t
"
.
join
(
L
[
1
:]).
strip
(
)
def
commit
(
self
,
subtransaction
=
None
):
"""Finalize the transaction."""
...
...
@@ -206,7 +205,7 @@ class Transaction:
if
(
objects
or
subjars
)
and
hosed
:
# Something really bad happened and we don't
# trust the system state.
raise
POSException
.
TransactionError
,
hosed_msg
raise
TransactionError
(
hosed_msg
)
# It's important that:
#
...
...
@@ -426,18 +425,17 @@ class Transaction:
def
note
(
self
,
text
):
if
self
.
description
:
self
.
description
=
"%s
\
n
\
n
%s"
%
(
self
.
description
,
strip
(
text
))
self
.
description
=
"%s
\
n
\
n
%s"
%
(
self
.
description
,
test
.
strip
(
))
else
:
self
.
description
=
strip
(
text
)
self
.
description
=
text
.
strip
(
)
def
setUser
(
self
,
user_name
,
path
=
'/'
):
self
.
user
=
"%s %s"
%
(
path
,
user_name
)
self
.
user
=
"%s %s"
%
(
path
,
user_name
)
def
setExtendedInfo
(
self
,
name
,
value
):
ext
=
self
.
_extension
if
ext
is
None
:
ext
=
self
.
_extension
=
{}
ext
[
name
]
=
value
if
self
.
_extension
is
None
:
self
.
_extension
=
{}
self
.
_extension
[
name
]
=
value
hosed_msg
=
\
"""A serious error, which was probably a system 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