summaryrefslogtreecommitdiffstats
path: root/ipsilon/util
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-01-23 18:11:26 +0100
committerSimo Sorce <simo@redhat.com>2014-01-24 17:32:21 -0500
commite34f21377d30704c342abb24a3a84c27fd8cc957 (patch)
tree9f2f5e15a33190ce6a90df58cd63c379c3983b7b /ipsilon/util
parentfe98579005973824000edb91e55975f2e7bf39e1 (diff)
downloadipsilon-e34f21377d30704c342abb24a3a84c27fd8cc957.tar.gz
ipsilon-e34f21377d30704c342abb24a3a84c27fd8cc957.tar.xz
ipsilon-e34f21377d30704c342abb24a3a84c27fd8cc957.zip
Use pep8 check
Signed-off-by: Petr Vobornik <pvoborni@redhat.com> Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'ipsilon/util')
-rwxr-xr-xipsilon/util/data.py3
-rwxr-xr-xipsilon/util/page.py2
-rwxr-xr-xipsilon/util/plugin.py1
-rwxr-xr-xipsilon/util/user.py3
4 files changed, 7 insertions, 2 deletions
diff --git a/ipsilon/util/data.py b/ipsilon/util/data.py
index 858fa55..15bf5b7 100755
--- a/ipsilon/util/data.py
+++ b/ipsilon/util/data.py
@@ -21,6 +21,7 @@ import os
import sqlite3
import cherrypy
+
class Store(object):
def __init__(self, path=None):
@@ -91,7 +92,7 @@ class Store(object):
if con:
con.rollback()
cherrypy.log.error("Failed to load %s's prefs from "
- "%s: [%s]" % ( user, dbname, e))
+ "%s: [%s]" % (user, dbname, e))
finally:
if con:
con.close()
diff --git a/ipsilon/util/page.py b/ipsilon/util/page.py
index a7e2035..18b5be2 100755
--- a/ipsilon/util/page.py
+++ b/ipsilon/util/page.py
@@ -20,6 +20,7 @@
from ipsilon.util.user import User
import cherrypy
+
def protect():
if cherrypy.request.login:
user = cherrypy.session.get('user', None)
@@ -29,6 +30,7 @@ def protect():
cherrypy.session.regenerate()
cherrypy.session['user'] = cherrypy.request.login
+
class Page(object):
def __init__(self, template_env):
self._env = template_env
diff --git a/ipsilon/util/plugin.py b/ipsilon/util/plugin.py
index 2db88dd..917f28b 100755
--- a/ipsilon/util/plugin.py
+++ b/ipsilon/util/plugin.py
@@ -21,6 +21,7 @@ import os
import imp
import cherrypy
+
class Plugins(object):
def __init__(self, path=None):
diff --git a/ipsilon/util/user.py b/ipsilon/util/user.py
index 6c5fc51..ccca9fb 100755
--- a/ipsilon/util/user.py
+++ b/ipsilon/util/user.py
@@ -19,12 +19,14 @@
from ipsilon.util.data import Store
+
class Site(object):
def __init__(self, value):
# implement lookup of sites id for link/name
self.link = value
self.name = value
+
class User(object):
def __init__(self, username):
if username is None:
@@ -76,4 +78,3 @@ class User(object):
def sites(self):
#TODO: implement setting sites via the user object ?
raise AttributeError
-