[PATCH 3/5] Remove un-needed code from misc

Pierre-Yves Chibon pingou at pingoured.fr
Sun Jan 27 13:11:27 UTC 2013


This code is being moved to the api_ns where it belongs
---
 coprs_frontend/coprs/views/misc.py | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/coprs_frontend/coprs/views/misc.py b/coprs_frontend/coprs/views/misc.py
index c5cffc1..e6a3f8a 100644
--- a/coprs_frontend/coprs/views/misc.py
+++ b/coprs_frontend/coprs/views/misc.py
@@ -1,7 +1,5 @@
 import datetime
 import functools
-import random
-import string
 
 import flask
 
@@ -26,17 +24,6 @@ def page_not_found(message):
 
 misc = flask.Blueprint('misc', __name__)
 
-def generate_api_token(size=30):
-    """ Generate a random string used as token to access the API
-    remotely.
-
-    :kwarg: size, the size of the token to generate, defaults to 30
-        chars.
-    :return: a string, the API token for the user.
-
-    """
-    return ''.join(random.choice(string.ascii_lowercase) for x in range(size))
-
 
 @misc.route('/login/', methods=['GET', 'POST'])
 @oid.loginhandler
-- 
1.8.1



More information about the copr-devel mailing list