Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
awstats
Commits
84fd9f008af5
Commit
e9e2472e
authored
Mar 15, 2012
by
Arthur Lutz
Browse files
remove print and larger exception
parent
e3e464d48670
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils.py
View file @
84fd9f00
...
@@ -22,7 +22,7 @@ from logilab.common.date import previous_month, first_day, date_range, last_day
...
@@ -22,7 +22,7 @@ from logilab.common.date import previous_month, first_day, date_range, last_day
from
logilab.common.shellutils
import
ProgressBar
from
logilab.common.shellutils
import
ProgressBar
from
cubicweb.req
import
FindEntityError
from
cubicweb.req
import
FindEntityError
from
cubicweb.web
import
NotFound
from
cubicweb.web
import
NotFound
,
Redirect
from
psycopg2
import
DataError
from
psycopg2
import
DataError
...
@@ -132,7 +132,7 @@ def extract_stats_dict(filepath):
...
@@ -132,7 +132,7 @@ def extract_stats_dict(filepath):
try
:
try
:
stats_dict
[
section_name
][
key
][
SECTIONSPEC
[
section_name
][
index
]]
=
value
stats_dict
[
section_name
][
key
][
SECTIONSPEC
[
section_name
][
index
]]
=
value
except
IndexError
:
except
IndexError
:
p
rint
index
,
value
,
line
p
ass
parsed_countdown
-=
1
parsed_countdown
-=
1
elif
section_name
and
parsed_countdown
==
0
:
elif
section_name
and
parsed_countdown
==
0
:
section_name
=
None
section_name
=
None
...
@@ -152,7 +152,7 @@ def eid_from_url(req, value):
...
@@ -152,7 +152,7 @@ def eid_from_url(req, value):
rset
=
req
.
execute
(
req
.
form
.
get
(
'rql'
))
rset
=
req
.
execute
(
req
.
form
.
get
(
'rql'
))
if
rset
and
len
(
rset
)
==
1
:
if
rset
and
len
(
rset
)
==
1
:
return
rset
[
0
][
0
]
return
rset
[
0
][
0
]
except
(
NotFound
,
DataError
):
except
(
NotFound
,
DataError
,
Redirect
):
pass
pass
def
get_or_create_statperiod
(
session
,
start
,
stop
,
stats_report
=
{}):
def
get_or_create_statperiod
(
session
,
start
,
stop
,
stats_report
=
{}):
...
...
Write
Preview
Supports
Markdown
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