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 pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "rda_python_dsupdt"
version = "2.0.1"
version = "2.0.2"
authors = [
{ name="Zaihua Ji", email="[email protected]" },
]
Expand Down
7 changes: 4 additions & 3 deletions src/rda_python_dsupdt/dsupdt.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
import re
from os import path as op
from .pg_updt import PgUpdt
from rda_python_common.pg_split import PgSplit

class DsUpdt(PgUpdt):
class DsUpdt(PgUpdt, PgSplit):
def __init__(self):
super().__init__() # initialize parent class
self.TEMPINFO = {}
Expand Down Expand Up @@ -1333,7 +1334,7 @@ def archive_data_file(self, lfile, locrec, tempinfo, eidx):
if tempinfo['gotnew'] and not re.search(r'(^|\s)-OE(\s|$)', options, re.I): acmd += " -OE"
if 'VS' in self.params:
acmd += " -VS {}".format(self.params['VS'])
if 'VS' in tempinfo: options = re.sub('-VS\s+\d+(\s+|$)', '', options, flags=re.I)
if 'VS' in tempinfo: options = re.sub(r'-VS\s+\d+(\s+|$)', '', options, flags=re.I)
if tempinfo['RS'] == 1: acmd += " -RS"
fnote = None
if locrec['note'] and not re.search(r'(^|\s)-DE(\s|$)', options, re.I):
Expand Down Expand Up @@ -1705,7 +1706,7 @@ def build_data_note(self, onote, lfile, locrec, tempinfo):
return onote
if pcnt == 2: # replace start time
if onote: # get start time from existing note
replace = "{}{}{}".format(seps[0], patterns[0], seps[1])
replace = r"{}{}{}".format(seps[0], patterns[0], seps[1])
ms = re.match(r'^(.*){}(.*){}'.format(replace, self.params['PD'][0]), note)
if ms:
init = ms.group(1)
Expand Down
2 changes: 1 addition & 1 deletion src/rda_python_dsupdt/pg_updt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ def check_server_file(self, dcmd, opt, cfile):
ms = re.match(r'^(-\w+)', buf)
while ms:
flg = ms.group(1)
buf = re.sub('^-\w+\s+'.format(flg), '', buf, 1) # remove options
buf = re.sub(r'^-\w+\s+'.format(flg), '', buf, 1) # remove options
if flg != "-r": # no option value
m = re.match(r'^(\S+)\s', buf)
if not m: break
Expand Down