diff --git a/psdash/log.py b/psdash/log.py index cf36fd6..1e50646 100644 --- a/psdash/log.py +++ b/psdash/log.py @@ -137,7 +137,7 @@ def add_available(self, filename): filename = filename.decode("utf-8") f = open(filename) f.close() - except IOError, e: + except IOError as e: raise LogError("Could not read log file '%s' (%s)" % (filename, e)) logger.debug("Adding log file %s", filename) @@ -158,7 +158,7 @@ def add_patterns(self, patterns): for log_file in glob2.iglob(p): try: self.add_available(log_file) - except LogError, e: + except LogError as e: logger.warning(e) logger.info("Added %d log file(s)", len(self.available)) diff --git a/psdash/web.py b/psdash/web.py index 1a6aad5..eae1c80 100755 --- a/psdash/web.py +++ b/psdash/web.py @@ -363,7 +363,7 @@ def view_log(): log = logs.get(filename, key=session.get("client_id")) log.set_tail_position() content = log.read() - print log.fp.tell() + print(log.fp.tell()) except KeyError: return render_template("error.html", error="Only files passed through args are allowed."), 401