summaryrefslogtreecommitdiff
path: root/opendc/models
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-26 22:50:27 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-26 22:50:27 +0200
commit4c6d68dd2e460095e20ba32007a35da4c5e6dae6 (patch)
tree13eeab79298913ee177e428519bc18fed5356efa /opendc/models
parent44f0bd378763f4c481fb8a87847ca84469b35a67 (diff)
Fix more PEP-8 violations
Diffstat (limited to 'opendc/models')
-rw-r--r--opendc/models/datacenter.py2
-rw-r--r--opendc/models/model.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/opendc/models/datacenter.py b/opendc/models/datacenter.py
index aeb9b3ad..29f8367c 100644
--- a/opendc/models/datacenter.py
+++ b/opendc/models/datacenter.py
@@ -25,7 +25,7 @@ class Datacenter(Model):
try:
section = Section.query('datacenter_id', self.id)[0]
- except Exception as e:
+ except:
return False
# Check the Section's Authorization
diff --git a/opendc/models/model.py b/opendc/models/model.py
index 30da9c67..44e4faf8 100644
--- a/opendc/models/model.py
+++ b/opendc/models/model.py
@@ -121,7 +121,7 @@ class Model(object):
"""Generate a SQLite updatable columns string for this Model."""
return ', '.join(
- ['{} = %s'.format(x) for x in cls.COLUMNS if not x in cls.COLUMNS_PRIMARY_KEY]
+ ['{} = %s'.format(x) for x in cls.COLUMNS if x not in cls.COLUMNS_PRIMARY_KEY]
)
# SQL TUPLE GENERATION METHODS
@@ -151,7 +151,7 @@ class Model(object):
value_list = []
- for column in [x for x in self.COLUMNS if not x in self.COLUMNS_PRIMARY_KEY]:
+ for column in [x for x in self.COLUMNS if x not in self.COLUMNS_PRIMARY_KEY]:
value_list.append(getattr(self, column, None))
return tuple(value_list)