Skip to content

Commit

Permalink
More comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jekil committed Mar 30, 2014
1 parent b291f5a commit 08b3074
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/db_migration/versions/from_0_6_to_1_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ def upgrade():
mongo_upgrade()

def mongo_upgrade():
"""Migrate mongodb schema and data."""
# Read reporting.conf to fetch mongo configuration.
config = Config(os.path.join("..", "..", "conf", "reporting.conf"))
# Run migration only if mongo is enabled as reporting module.
if config.mongodb.enabled:
host = config.mongodb.get("host", "127.0.0.1")
port = config.mongodb.get("port", 27017)
Expand All @@ -123,7 +126,6 @@ def mongo_upgrade():
try:
conn = Connection(host, port)
db = conn.cuckoo
#fs = GridFS(db)
except TypeError:
print "Mongo connection port must be integer"
sys.exit()
Expand Down

0 comments on commit 08b3074

Please sign in to comment.