01dcf599c63d22f2f7882164774f52f3776fa897,db_mgmt_admin.py,,,#,81

Before Change


        if not existsInDB(username):
            exitUserNotExists()
        password = buildPassword(getpass.getpass("Old password:"), user=username)
        if collection.find({"username":username, "password":password}).count()==0:
            sys.exit("User/password combination does not exist")
        keyset = promptNewPass()
        collection.update({"username":username}, {"$set":{"password":keyset["password"], "salt":keyset["salt"]}})
        sys.exit("Password updated")
    elif args.r:

After Change



except pymongo.errors.ConnectionFailure:
    print("Can"t connect to the mongo database")
except Exception as e:
    print(e)
    print("Outdated database. Please drop and re-fill your database")
    
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: cve-search/cve-search
Commit Name: 01dcf599c63d22f2f7882164774f52f3776fa897
Time: 2015-01-26
Author: pieterjan.moreels@gmail.com
File Name: db_mgmt_admin.py
Class Name:
Method Name:


Project Name: polyaxon/polyaxon
Commit Name: 0a552621cbc351e648c1b41c0e3ae804439b1bf1
Time: 2018-10-30
Author: mouradmourafiq@gmail.com
File Name: polyaxon/api/experiments/views.py
Class Name: ProjectExperimentListView
Method Name: perform_create


Project Name: comic/grand-challenge.org
Commit Name: e8bafba0d6a342e0a6de13f4ca05b71a111f22e1
Time: 2018-10-18
Author: jamesmeakin@gmail.com
File Name: app/grandchallenge/core/views.py
Class Name:
Method Name: comicmain