diff --git a/.gitignore b/.gitignore index 30f7de0..7bc225f 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,7 @@ node_modules # Users Environment Variables .lock-wscript -.idea +.idea/* *.pyc *.egg-info dist diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index 86ed68b..0000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -freemail \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index 97626ba..0000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/freemail.iml b/.idea/freemail.iml deleted file mode 100644 index 6711606..0000000 --- a/.idea/freemail.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index f117667..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 3b31283..0000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index f3001dc..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index f464cf8..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 96f82c2..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,600 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1458748151073 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/freemail/__init__.py b/freemail/__init__.py index d91dbf4..c6dbbfe 100644 --- a/freemail/__init__.py +++ b/freemail/__init__.py @@ -8,7 +8,9 @@ disp_file = os.path.join(__location__, './data/disposable.txt') def is_free(email_address): - if not isinstance(email_address, str): + try: + email_address = str(email_address) + except: raise TypeError('email must be a string') with open(free_file, 'r') as free, open(disp_file, 'r') as disposable: @@ -19,7 +21,9 @@ def is_free(email_address): def is_disposable(email_address): - if not isinstance(email_address, str): + try: + email_address = str(email_address) + except: raise TypeError('email must be a string') with open(disp_file, 'r') as disposable: diff --git a/setup.py b/setup.py index de4b9de..9390e82 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ setup( # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html - version='1.2.15', + version='1.2.16', description='A database of free and disposable email domains', long_description=long_description,