from pymongo import MongoClient
import json
import sys
from emission.core.get_database import get_db, get_section_db
from emission.tests import common

def purgeData(userName):
  Sections=get_section_db()
  common.purgeData(Sections)

def purgeAllData():
  db = get_db()
  common.dropAllCollections(db)

if __name__ == '__main__':
  if len(sys.argv) == 0:
    print "USAGE: %s [userName]" % sys.argv[0]
    exit(1)

  if len(sys.argv) == 1:
    purgeAllData()
  else:
    purgeData(sys.argv[1])

from pymongo import MongoClient
import json
import sys
from emission.core.get_database import get_db, get_section_db
import emission.tests.common as etc

def purgeAllData():
  db = get_db()
  etc.dropAllCollections(db)

if __name__ == '__main__':
  if len(sys.argv) != 1:
    print "USAGE: %s" % sys.argv[0]
    exit(1)

  purgeAllData()

Fix obsolete code + import
Fix obsolete code + import

I can now run this without anything crashing

```
C02KT61MFFT0:e-mission-server shankari$ ./e-mission-py.bash bin/purge_database_json.py localhost
USAGE: bin/purge_database_json.py
C02KT61MFFT0:e-mission-server shankari$ ./e-mission-py.bash bin/purge_database_json.py
C02KT61MFFT0:e-mission-server shankari$
```
