cedadev / ceda-cc

CEDA File Compliance Checker
1 stars 3 forks source link

NameError: name 'mode' is not defined #12

Closed charliepascoe closed 3 years ago

charliepascoe commented 3 years ago

I was getting a name error from /home/badc/miniconda3/envs/ingest_py3/lib/python3.8/site-packages/ceda_cc/ceda_cc_config/utils_config.py

The mode in self.mode = mode below hadn't been assigned but it wasn't being used either so I commented that line out and the ceda-cc code ran ok.

We should correct the code in the github repo too.

`class NumericControl(object): """Check on a numeric object"""

def init(self,tag,target_type=None,max_valid=None,min_valid=None,element_check=None, base_class=None):

self.tag = tag

self.mode = mode

self.target_type = target_type

self.base_class = base_class

self.max_valid = max_valid

self.min_valid = min_valid

self.element_check = element_check`
martinjuckes commented 3 years ago

Error found on ingest4, ceda_cc on command line.

martinjuckes commented 3 years ago

Thanks .. fixed in master.