Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ jobs:
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --indent-size=3
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
80 changes: 0 additions & 80 deletions scripts/fill_ispddb.py

This file was deleted.

10 changes: 6 additions & 4 deletions src/rda_python_common/PgLOG.py
Original file line number Diff line number Diff line change
Expand Up @@ -1511,17 +1511,19 @@ def check_process_host(hosts, chost = None, mflag = None, pinfo = None, logact =
#
# convert special characters
#
def convert_chars(name, default = None):
def convert_chars(name, default = 'X'):

if not name: return default
if re.match(r'^[a-zA-Z0-9]+$', name): return name # no need convert

if not name or re.match(r'^[a-zA-Z0-9]+$', name): return name # no need convert

z = ord('z')
newchrs = ochrs = ''
if default == None: default = name
for i in range(len(name)):
ch = name[i]
if re.match(r'^[a-zA-Z0-9]$', ch):
newchrs += ch
elif (ch == ' ' or ch == '_') and newchrs:
newchrs += '_'
elif ord(ch) > z and ochrs != None:
if not ochrs:
ochrs = None
Expand Down
Loading