Browse Source

Fix style

git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@10446 ddd99763-3ecb-0310-9145-efcb8ce7c51f
tags/bxinterval-last
Jim Paris 12 years ago
parent
commit
5b89fa7ccf
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      nilmdb/nilmdb.py
  2. +1
    -1
      nilmdb/server.py

+ 2
- 2
nilmdb/nilmdb.py View File

@@ -68,7 +68,7 @@ class NilmDB(object):
# Create the database path if it doesn't exist
try:
os.makedirs(self.basepath)
except OSError, e:
except OSError as e:
if e.errno != errno.EEXIST:
raise IOError("can't create tree " + self.basepath)

@@ -174,7 +174,7 @@ class NilmDB(object):
index = [ "timestamp" ]
for ind in index:
table.cols._f_col(ind).createIndex()
except KeyError, e:
except KeyError as e:
# Remove this table if we got an error
self.h5file.removeNode(group, node)
raise e


+ 1
- 1
nilmdb/server.py View File

@@ -63,7 +63,7 @@ class Stream(NilmApp):
def get_metadata(self, path, key=None):
try:
data = self.db.stream_get_metadata(path)
except nilmdb.StreamException, e:
except nilmdb.StreamException as e:
raise cherrypy.HTTPError("404 Not Found", e.message)
if key is None: # If no keys specified, return them all
key = data.keys()


Loading…
Cancel
Save