From c8880de52ce021f6cea5e9ec535c3528d599f6c7 Mon Sep 17 00:00:00 2001 From: Andre Miller Date: Tue, 20 Jan 2015 00:38:26 +0200 Subject: [PATCH] Fixes for flake8 validation --- beetsplug/web/__init__.py | 1 + beetsplug/web/crossdomaindec.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/beetsplug/web/__init__.py b/beetsplug/web/__init__.py index 34d33e01e..b3114dbab 100644 --- a/beetsplug/web/__init__.py +++ b/beetsplug/web/__init__.py @@ -26,6 +26,7 @@ from crossdomaindec import crossdomain, set_cors_origin # Utilities. + def _rep(obj, expand=False): """Get a flat -- i.e., JSON-ish -- representation of a beets Item or Album object. For Albums, `expand` dictates whether tracks are diff --git a/beetsplug/web/crossdomaindec.py b/beetsplug/web/crossdomaindec.py index 2fde1eae8..8411c6fe8 100644 --- a/beetsplug/web/crossdomaindec.py +++ b/beetsplug/web/crossdomaindec.py @@ -21,15 +21,18 @@ from datetime import timedelta from flask import make_response, request, current_app from functools import update_wrapper -cors_origin = 'http://127.0.0.1' +cors_origin = 'http://127.0.0.1' + def set_cors_origin(origin): global cors_origin cors_origin = origin + def get_cors_origin(): return cors_origin + def crossdomain(methods=None, headers=None, max_age=21600, attach_to_all=True, automatic_options=True):