Skip to content

Commit

Permalink
Spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
jlubken committed Jun 2, 2020
1 parent 0fca42f commit a35f074
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/dsdk/mssql.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def open_mssql(self) -> Generator:
logger.info('"action": "connect"')


class CheckTablePriviledges(Task): # pylint: disable=too-few-public-methods
"""Check table priviledges."""
class CheckTablePrivileges(Task): # pylint: disable=too-few-public-methods
"""Check table privileges."""

CONNECT = """
select 1 as n
Expand All @@ -82,17 +82,17 @@ class CheckTablePriviledges(Task): # pylint: disable=too-few-public-methods
select 1 as n where exists (select 1 as n from {table})
"""

KEY = "table_priviledge_check"
KEY = "table_privilege_check"

ON = "".join(("{", f'"key": "{KEY}.on"', "}"))

END = "".join(("{", f'"key": "{KEY}.end"', "}"))

COLUMN_PRIVILEDGE = "".join(
COLUMN_PRIVILEGE = "".join(
(
"{",
", ".join(
(f'"key": "{KEY}.column_priviledge_warning"', '"value": "%s"')
(f'"key": "{KEY}.column_privilege_warning"', '"value": "%s"')
),
"}",
)
Expand Down Expand Up @@ -129,7 +129,7 @@ def __call__(self, batch, service):
number, *_ = error.orig.args
# column privileges is a standard-breaking mssql "feature"
if number == 230:
logger.info(self.COLUMN_PRIVILEDGE, table)
logger.info(self.COLUMN_PRIVILEGE, table)
continue
logger.warning(self.FAILED, table)
failures.append(table)
Expand Down

0 comments on commit a35f074

Please sign in to comment.