Skip to content

Commit 4635c31

Browse files
committed
Fixed memo error when not using with statement
1 parent ee42857 commit 4635c31

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

rxclass_api/RxClassHelpers.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class RxClassHelpers(object):
1010

1111
def __init__(self, save_memo=True, filename="rxclass_data"):
1212
self.save_memo = save_memo
13+
self.memo = {}
1314
self.filename = filename
1415
self.api = RxAPIWrapper()
1516
self.drug_class_types = {
@@ -331,4 +332,7 @@ def __enter__(self):
331332

332333
def __exit__(self, type, value, traceback):
333334
if self.save_memo:
334-
self.save()
335+
self.save()
336+
337+
helper = RxClassHelpers()
338+
print(helper.indications('bupropion'))

0 commit comments

Comments
 (0)