Browse Source

HUE-8737 [core] Futurize apps/about/ for Python 3.5

Ying Chen 6 years ago
parent
commit
068de915a3
2 changed files with 3 additions and 1 deletions
  1. 1 0
      apps/about/src/about/tests.py
  2. 2 1
      apps/about/src/about/views.py

+ 1 - 0
apps/about/src/about/tests.py

@@ -15,6 +15,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+from builtins import object
 import json
 
 from django.contrib.auth.models import User

+ 2 - 1
apps/about/src/about/views.py

@@ -15,6 +15,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+from builtins import str
 import json
 import logging
 
@@ -55,7 +56,7 @@ def update_preferences(request):
       settings.save()
       response['status'] = 0
       response['collect_usage'] = settings.collect_usage
-    except Exception, e:
+    except Exception as e:
       response['data'] = str(e)
   else:
     response['data'] = _('POST request required.')