Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
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
Jérome Perrin
erp5
Commits
4e5ad574
Commit
4e5ad574
authored
Mar 29, 2019
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*: adjust what 2to3's except fixer left as TODO
parent
646b86bc
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
13 deletions
+10
-13
product/CMFActivity/Activity/SQLBase.py
product/CMFActivity/Activity/SQLBase.py
+2
-3
product/CMFActivity/Activity/SQLJoblib.py
product/CMFActivity/Activity/SQLJoblib.py
+2
-3
product/ERP5/Tool/SimulationTool.py
product/ERP5/Tool/SimulationTool.py
+2
-3
product/ERP5/tests/erp5_url_checker.py
product/ERP5/tests/erp5_url_checker.py
+4
-4
No files found.
product/CMFActivity/Activity/SQLBase.py
View file @
4e5ad574
...
...
@@ -192,9 +192,8 @@ CREATE TABLE %s (
db
.
query
(
"SET @uid := %s"
%
getrandbits
(
UID_SAFE_BITSIZE
))
try
:
db
.
query
(
self
.
_insert_template
%
(
self
.
sql_table
,
values
))
except
MySQLdb
.
IntegrityError
as
xxx_todo_changeme
:
(
code
,
_
)
=
xxx_todo_changeme
.
args
if
code
!=
DUP_ENTRY
:
except
MySQLdb
.
IntegrityError
as
e
:
if
e
.
args
[
0
]
!=
DUP_ENTRY
:
raise
reset_uid
=
True
else
:
...
...
product/CMFActivity/Activity/SQLJoblib.py
View file @
4e5ad574
...
...
@@ -93,9 +93,8 @@ CREATE TABLE %s (
db
.
query
(
"SET @uid := %s"
%
getrandbits
(
UID_SAFE_BITSIZE
))
try
:
db
.
query
(
self
.
_insert_template
%
(
self
.
sql_table
,
values
))
except
MySQLdb
.
IntegrityError
as
xxx_todo_changeme
:
(
code
,
_
)
=
xxx_todo_changeme
.
args
if
code
!=
DUP_ENTRY
:
except
MySQLdb
.
IntegrityError
as
e
:
if
e
.
args
[
0
]
!=
DUP_ENTRY
:
raise
reset_uid
=
True
else
:
...
...
product/ERP5/Tool/SimulationTool.py
View file @
4e5ad574
...
...
@@ -1420,9 +1420,8 @@ class SimulationTool(BaseTool):
inventory_cache_kw
[
'date'
]
=
to_date
try
:
cached_sql_result
=
Resource_zGetInventoryCacheResult
(
**
inventory_cache_kw
)
except
ProgrammingError
as
xxx_todo_changeme
:
(
code
,
_
)
=
xxx_todo_changeme
.
args
if
code
!=
NO_SUCH_TABLE
:
except
ProgrammingError
as
e
:
if
e
.
args
[
0
]
!=
NO_SUCH_TABLE
:
raise
# First use of the optimisation, we need to create the table
LOG
(
"SimulationTool._getCachedInventoryList"
,
INFO
,
...
...
product/ERP5/tests/erp5_url_checker.py
View file @
4e5ad574
...
...
@@ -147,15 +147,15 @@ class Checker(URLOpener):
while
thread
.
isAlive
():
sleep
(
0.5
)
print
"Connection to %s went fine"
%
url
except
IOError
as
xxx_todo_changem
e
:
(
errno
,
strerror
)
=
xxx_todo_changem
e
.
args
except
IOError
as
e
:
(
errno
,
strerror
)
=
e
.
args
print
"Can't connect to %s because of I/O error(%s): %s"
%
(
url
,
errno
,
strerror
)
def
SearchUrl
(
self
,
url
=
None
):
try
:
conn
=
self
.
open_http
(
url
)
except
IOError
as
xxx_todo_changeme1
:
(
errno
,
strerror
)
=
xxx_todo_changeme1
.
args
except
IOError
as
e
:
(
errno
,
strerror
)
=
e
.
args
print
"Can't connect to %s because of I/O error(%s): %s"
%
(
url
,
errno
,
strerror
)
...
...
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