Skip to content

Commit

Permalink
Python3 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rsiera committed Dec 5, 2016
1 parent 1afd06c commit d290b1f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion pg_view/models/collector_partition.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import os
import time
from multiprocessing import Process

import os
import psutil
import sys

from pg_view.consts import RD, TICK_LENGTH, SECTOR_SIZE
from pg_view.formatters import StatusFormatter, FnFormatter
from pg_view.models.collector_base import BaseStatCollector, logger
from pg_view.models.displayers import COLALIGN

if sys.hexversion >= 0x03000000:
long = int


class PartitionStatCollector(BaseStatCollector):
"""Collect statistics about PostgreSQL partitions """
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
def read_module(path):
data = {}
with open(path, 'r') as fd:
exec (fd.read(), data)
exec(fd.read(), data)
return data


Expand Down
5 changes: 4 additions & 1 deletion tests/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from StringIO import StringIO
try:
from io import StringIO
except ImportError:
from StringIO import StringIO

import os

Expand Down

0 comments on commit d290b1f

Please sign in to comment.