Commit 56d69c55 authored by Julien Cristau's avatar Julien Cristau

Import _ from cubicweb

Silence cubicweb 3.22 deprecation warnings by not relying on _ being
builtin.
parent 8de830381277
...@@ -21,6 +21,10 @@ from datetime import datetime, date ...@@ -21,6 +21,10 @@ from datetime import datetime, date
from logilab.common.date import previous_month, first_day, date_range, last_day 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
try:
from cubicweb import _
except ImportError:
_ = unicode
from cubicweb.req import FindEntityError from cubicweb.req import FindEntityError
from cubicweb.web import NotFound, Redirect from cubicweb.web import NotFound, Redirect
......
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
# You should have received a copy of the GNU Lesser General Public License along # You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>. # with this program. If not, see <http://www.gnu.org/licenses/>.
try:
from cubicweb import _
except ImportError:
_ = unicode
from cubicweb.web import action from cubicweb.web import action
from cubicweb.predicates import match_user_groups from cubicweb.predicates import match_user_groups
......
...@@ -26,6 +26,10 @@ import urllib ...@@ -26,6 +26,10 @@ import urllib
from logilab.mtconverter import xml_escape from logilab.mtconverter import xml_escape
from logilab.common.textutils import BYTE_UNITS from logilab.common.textutils import BYTE_UNITS
try:
from cubicweb import _
except ImportError:
_ = unicode
from cubicweb.view import StartupView from cubicweb.view import StartupView
from cubicweb.web.views import forms from cubicweb.web.views import forms
from cubicweb.web.formfields import StringField, DateField from cubicweb.web.formfields import StringField, DateField
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment