Skip to content

Commit cc34ef0

Browse files
try catch when importing dotenv
1 parent 62324ea commit cc34ef0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/test_examples.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@
1616
examples_path = join(dirname(__file__), '../', 'examples', '*.py')
1717

1818
# environment variables
19-
if sys.version_info != (3,2):
19+
try:
2020
from dotenv import load_dotenv
2121
dotenv_path = join(dirname(__file__), '../', '.env')
2222
load_dotenv(dotenv_path)
23+
except:
24+
print 'WARNING: dotenv could not be imported'
25+
pass
2326

2427
@pytest.mark.skipif(os.getenv('VCAP_SERVICES') is None, reason='requires VCAP_SERVICES')
2528
def test_examples():

0 commit comments

Comments
 (0)