Skip to content
Merged
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
7 changes: 6 additions & 1 deletion pyard/ard.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#
import functools
import re
import sqlite3
import sys
from typing import Iterable, List

Expand Down Expand Up @@ -473,7 +474,11 @@ def is_mac(self, allele: str) -> bool:
"""
if ":" in allele:
code = allele.split(":")[1]
return db.is_valid_mac_code(self.db_connection, code)
try:
if code.isalpha():
return db.is_valid_mac_code(self.db_connection, code)
except sqlite3.OperationalError as e:
print("Error: ", e)
return False

def is_v2(self, allele: str) -> bool:
Expand Down