From 9134620284c85b341114e661327a73fb650b5f71 Mon Sep 17 00:00:00 2001 From: geomars Date: Wed, 4 Oct 2017 16:01:07 +0700 Subject: [PATCH 1/2] change from flask_wtf.html5 to wtforms.fields.html5 due to FlaskWTFDeprecation Warning --- fbone/user/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fbone/user/forms.py b/fbone/user/forms.py index 78eb2ff..6efe4dd 100644 --- a/fbone/user/forms.py +++ b/fbone/user/forms.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from flask_wtf import Form -from flask_wtf.html5 import URLField, EmailField, TelField +from wtforms.fields.html5 import URLField, EmailField, TelField from wtforms import ValidationError, StringField, PasswordField, SubmitField, \ TextAreaField, FileField, DateField, SelectField From 0e2b553de6a4dec0aa7587a4dd8f230c736a062b Mon Sep 17 00:00:00 2001 From: geomars Date: Wed, 4 Oct 2017 16:16:44 +0700 Subject: [PATCH 2/2] add support for py3 and backwards-compatible with py2.6 and 2.7 for the raise syntax --- fbone/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fbone/utils.py b/fbone/utils.py index eaf1a21..2f5a81e 100644 --- a/fbone/utils.py +++ b/fbone/utils.py @@ -35,5 +35,5 @@ def make_dir(dir_path): try: if not os.path.exists(dir_path): os.mkdir(dir_path) - except Exception, e: + except getopt.GetoptError as e: # in python3 the raise syntax no longer accepts comma-separated arguments raise e