Merge pull request #99 from chatcannon/mdbtools-1-0

Update regular expression for mdbtools 1.0 output
This commit is contained in:
2024-02-03 13:47:06 +02:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -17,8 +17,7 @@ jobs:
pytest:
name: Run Python unit tests
# Note that 20.04 is currently required until galvani supports mdbtools>=1.0.
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false

View File

@@ -439,7 +439,8 @@ CREATE VIEW IF NOT EXISTS Capacity_View
def mdb_get_data_text(s3db, filename, table):
print("Reading %s..." % table)
insert_pattern = re.compile(
r'INSERT INTO "\w+" \([^)]+?\) VALUES \(("[^"]*"|[^")])+?\);\n', re.IGNORECASE
r"""INSERT INTO "\w+" \([^)]+?\) VALUES (\((('[^']*')|"[^"]*"|[^')])+?\),?\s*)+;\n""",
re.IGNORECASE,
)
try:
# Initialize values to avoid NameError in except clause