GitLab will be upgraded on June 23rd evening. During the upgrade the service will be unavailable, sorry for the inconvenience.

Commit 36663d9f authored by Olof Svensson's avatar Olof Svensson

Issue #2: Removed bson and pymongo from requirements

parent d72553e0
......@@ -24,11 +24,17 @@ __license__ = "MIT"
__date__ = "16/10/2019"
import os
import bson
import datetime
import pymongo
from bson.objectid import ObjectId
try:
import pymongo
import bson
from bson.objectid import ObjectId
USE_MONGODB = True
except:
print("Error when trying to import pymongo and/or bson - no MongoDB connection possible")
USE_MONGODB = False
def getDateTimeString():
......@@ -36,7 +42,10 @@ def getDateTimeString():
def getMongoUrl():
return os.environ.get('PYPUSHFLOW_MONGOURL', None)
mongoUrl = None
if USE_MONGODB:
mongoUrl = os.environ.get('PYPUSHFLOW_MONGOURL', None)
return mongoUrl
def initMongo(name):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment