Skip to content

Pep8 errors fixed #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions testgres/testgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ def begin(self, isolation_level=0):

# Something is wrong, emit exception
else:
raise QueryException('Invalid isolation level "{}"'.format(isolation_level))
raise QueryException('Invalid isolation level "{}"'.format(
isolation_level))

self.cursor.execute('SET TRANSACTION ISOLATION LEVEL {}'.format(isolation_level))
self.cursor.execute('SET TRANSACTION ISOLATION LEVEL {}'.format(
isolation_level))

def commit(self):
self.connection.commit()
Expand Down Expand Up @@ -228,7 +230,8 @@ def init(self, allows_streaming=False):

return self

def init_from_backup(self, root_node, backup_name, has_streaming=False, hba_permit_replication=True):
def init_from_backup(self, root_node, backup_name, has_streaming=False,
hba_permit_replication=True):
"""Initializes cluster from backup, made by another node"""

# Copy data from backup
Expand Down Expand Up @@ -446,7 +449,8 @@ def backup(self, name):
pg_basebackup = self.get_bin_path("pg_basebackup")
backup_path = os.path.join(self.base_dir, name)
os.makedirs(backup_path)
params = [pg_basebackup, "-D", backup_path, "-p {}".format(self.port), "-x"]
params = [pg_basebackup, "-D", backup_path, "-p {}".format(
self.port), "-x"]
with open(self.output_filename, "a") as file_out, \
open(self.error_filename, "a") as file_err:
ret = subprocess.call(
Expand Down