Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

PEP8 I'm so sorry I have sinned.

  • Loading branch information...
commit b2fc79e935dc9bf4a7c6656bd65c8dfa9cbe2a25 1 parent 6983292
@mitechie authored
View
5 bookie/bcelery/celeryconfig.py
@@ -1,7 +1,2 @@
#!/usr/bin/env python
"""Celery config for Bookie Instance"""
-# from bookie.bcelery import load_config
-# ini = load_config()
-#
-# import bookie.bcelery.tasks
-# bookie.bcelery.tasks.ini_items = ini
View
4 bookie/lib/importer.py
@@ -21,7 +21,8 @@ def __init__(self, import_io, username=None):
self.username = username
# we need to get our list of hashes to make sure we check for dupes
- self.hash_list = set([b[0] for b in BmarkMgr.hash_list(username=username)])
+ self.hash_list = set([b[0] for b in
+ BmarkMgr.hash_list(username=username)])
def __new__(cls, *args, **kwargs):
"""Overriding new we return a subclass based on the file content"""
@@ -147,7 +148,6 @@ def process(self):
transaction.commit()
-
class GBookmarkImporter(Importer):
"""Process a Google Bookmark export html file"""
View
8 bookie/models/queue.py
@@ -24,12 +24,12 @@ class ImportQueueMgr(object):
def get(id=None, username=None, status=None):
"""Get the import item"""
if (id):
- qry = ImportQueue.query.filter(ImportQueue.id==id)
+ qry = ImportQueue.query.filter(ImportQueue.id == id)
elif (username):
- qry = ImportQueue.query.filter(ImportQueue.username==username)
+ qry = ImportQueue.query.filter(ImportQueue.username == username)
if status is not None:
- qry = qry.filter(ImportQueue.status==status)
+ qry = qry.filter(ImportQueue.status == status)
return qry.first()
@@ -42,7 +42,7 @@ def get_details(id=None, username=None):
"""
your_import = ImportQueueMgr.get(id=id, username=username)
- place_qry = ImportQueue.query.filter(ImportQueue.status==NEW)
+ place_qry = ImportQueue.query.filter(ImportQueue.status == NEW)
place_qry = place_qry.filter(ImportQueue.id < your_import.id)
return {
View
2  bookie/views/api.py
@@ -19,7 +19,6 @@
from bookie.models import Bmark
from bookie.models import BmarkMgr
from bookie.models import DBSession
-from bookie.models import Hashed
from bookie.models import NoResultFound
from bookie.models import Readable
from bookie.models import TagMgr
@@ -1002,6 +1001,7 @@ def new_user(request):
'error': 'Bad Request: User exists.',
}
+
@view_config(route_name="api_admin_del_user", renderer="json")
@api_auth('api_key', UserMgr.get, admin_only=True)
def del_user(request):
Please sign in to comment.
Something went wrong with that request. Please try again.