summaryrefslogtreecommitdiff
path: root/opendc/models/rack_state.py
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-25 13:50:49 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-25 13:50:49 +0200
commita1589e75358558eada7ffc2efc7e3fa7160d233e (patch)
tree7889a2364292cd8b90fe996da7907bebf200d3dc /opendc/models/rack_state.py
parent1f34466d41ba01a3dd36b0866696367d397daf7e (diff)
Reformat codebase and fix spelling errors
Diffstat (limited to 'opendc/models/rack_state.py')
-rw-r--r--opendc/models/rack_state.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/opendc/models/rack_state.py b/opendc/models/rack_state.py
index e43dc940..c0f0ff6c 100644
--- a/opendc/models/rack_state.py
+++ b/opendc/models/rack_state.py
@@ -1,8 +1,8 @@
from opendc.models.model import Model
from opendc.util import database
-class RackState(Model):
+class RackState(Model):
JSON_TO_PYTHON_DICT = {
'RackState': {
'rackId': 'rack_id',
@@ -16,9 +16,9 @@ class RackState(Model):
"""Instantiate a RackState from a database row."""
return cls(
- rack_id = row[0],
- load_fraction = row[1],
- tick = row[2]
+ rack_id=row[0],
+ load_fraction=row[1],
+ tick=row[2]
)
@classmethod
@@ -63,7 +63,6 @@ class RackState(Model):
rack_states.append(cls._from_database_row(row))
return rack_states
-
def google_id_has_at_least(self, google_id, authorization_level):
"""Return True if the User has at least the given auth level over this RackState."""