Skip to content

Commit

Permalink
use tr to filter invalid characters, fix #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Windfarer committed Dec 20, 2015
1 parent db71b1a commit 328fd85
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def cleanup(*args):

DUMP_CMD = 'mysqldump -h {host} -P {port} -u {user} --password={password} {db} {table} ' \
'--default-character-set=utf8 -X'.format(**config['mysql'])

# For removing invalid characters in xml stream.
REMOVE_INVALID_PIPE = r'tr -d "\00\01\02\03\04\05\06\07\10\13\14\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37"'

BINLOG_CFG = {key: config['mysql'][key] for key in ['host', 'port', 'user', 'password', 'db']}
Expand Down

0 comments on commit 328fd85

Please sign in to comment.