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

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

No files matched your search

+1 -2
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
+2 -1
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