We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b26931 commit ff7d43fCopy full SHA for ff7d43f
pyard/ard.py
@@ -23,6 +23,7 @@
23
#
24
import functools
25
import re
26
+import sqlite3
27
import sys
28
from typing import Iterable, List
29
@@ -473,7 +474,11 @@ def is_mac(self, allele: str) -> bool:
473
474
"""
475
if ":" in allele:
476
code = allele.split(":")[1]
- return db.is_valid_mac_code(self.db_connection, code)
477
+ try:
478
+ if code.isalpha():
479
+ return db.is_valid_mac_code(self.db_connection, code)
480
+ except sqlite3.OperationalError as e:
481
+ print("Error: ", e)
482
return False
483
484
def is_v2(self, allele: str) -> bool:
0 commit comments