Skip to content

Commit

Permalink
Remove unnecessary trailing semicolons from Python scripts. (#15976)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxuqi authored Sep 6, 2023
1 parent 4e865bb commit 5e5295a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions gpMgmt/bin/gpload.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,11 +807,11 @@ def run(self):

def cli_help():
help_path = os.path.join(sys.path[0], '..', 'docs', 'cli_help', EXECNAME +
'_help');
'_help')
f = None
try:
try:
f = open(help_path);
f = open(help_path)
return f.read(-1)
except:
return ''
Expand Down Expand Up @@ -1278,7 +1278,7 @@ def log(self, level, a):
pass

if level == self.ERROR:
self.exitValue = 2;
self.exitValue = 2
sys.exit(self.exitValue)

def getconfig(self, a, typ=None, default='error', extraStuff='', returnOriginal=False):
Expand Down Expand Up @@ -2593,7 +2593,7 @@ def count_errors(self):
results = cur.fetchall()
global NUM_WARN_ROWS
NUM_WARN_ROWS = (results[0])[0]
return (results[0])[0];
return (results[0])[0]
return 0

def report_errors(self):
Expand Down
4 changes: 2 additions & 2 deletions gpMgmt/bin/gppylib/commands/gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def __init__(self, name, dataDir, port, era,

# build pg_ctl command
c = PgCtlStartArgs(dataDir, b, era, wrapper, wrapper_args, wait, timeout)
logger.info("CoordinatorStart pg_ctl cmd is %s", c);
logger.info("CoordinatorStart pg_ctl cmd is %s", c)
self.cmdStr = str(c)

Command.__init__(self, name, self.cmdStr, ctxt, remoteHost)
Expand Down Expand Up @@ -398,7 +398,7 @@ def __init__(self, name, gpdb, numContentsInCluster, era, mirrormode,

# build pg_ctl command
c = PgCtlStartArgs(datadir, b, era, wrapper, wrapper_args, pg_ctl_wait, timeout)
logger.info("SegmentStart pg_ctl cmd is %s", c);
logger.info("SegmentStart pg_ctl cmd is %s", c)
self.cmdStr = str(c) + ' 2>&1'

Command.__init__(self, name, self.cmdStr, ctxt, remoteHost)
Expand Down
2 changes: 1 addition & 1 deletion gpMgmt/bin/gppylib/commands/unix.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,6 @@ def getDescendentProcesses(pid):
elif curr_platform == FREEBSD:
SYSTEM = FreeBsdPlatform()
elif curr_platform == OPENBSD:
SYSTEM = OpenBSDPlatform();
SYSTEM = OpenBSDPlatform()
else:
raise Exception("Platform %s is not supported. Supported platforms are: %s", SYSTEM, str(platform_list))
2 changes: 1 addition & 1 deletion gpMgmt/bin/gppylib/gpparseopts.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def read_helpfile(self):
f = None
try:
try:
f = open(help_path);
f = open(help_path)
return f.read(-1)
except:
return None
Expand Down
2 changes: 1 addition & 1 deletion gpMgmt/bin/gppylib/programs/clsSystemState.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def addValue(self, key, value, isWarning=False):
self.__currentSegmentData["values"][key] = value
self.__currentSegmentData["isWarning"][key] = isWarning

assert key in self.__allValues;
assert key in self.__allValues

def isClusterProbablyDown(self, gpArray):
"""
Expand Down
2 changes: 1 addition & 1 deletion gpcontrib/gp_replica_check/gp_replica_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, segrow, datname, relation_types):
self.ploc = segrow[4]
self.mloc = segrow[5]
self.datname = datname
self.relation_types = relation_types;
self.relation_types = relation_types
self.result = False
self.lock = threading.Lock()

Expand Down

0 comments on commit 5e5295a

Please sign in to comment.