Commits

Jacek Bzdak committed 3ee1b30

Cleaned runner script a bit.

Comments (0)

Files changed (1)

 import datetime
 import importlib
 
-settings_dir = os.path.join(os.path.expanduser("~"), '.bd_tests_run')
-
-if not os.path.exists(settings_dir):
-    os.mkdir(settings_dir)
-
-database = shelve.open(os.path.join(settings_dir, "passdb"))
 
 from argparse import ArgumentParser
 
 set_password = subparsers.add_parser("set_password")
 set_password.set_defaults(action="set_password")
 
-clear_cache = subparsers.add_parser("clear_cache")
-clear_cache.set_defaults(action="clear_cache")
 
 show_marks = subparsers.add_parser("show_marks")
 show_marks.set_defaults(action="show_marks")
 
     if unit_id:
         data = {}
-        if user_id in database:
-            data = database[user_id]
-        data[str(unit_id)] = {
-            "digest": hasher.hexdigest(),
-            "date": datetime.date.today()
-        }
-        database[str(user_id)] = data
-        database.sync()
         return {
             "digest": hasher.hexdigest(),
             "date": datetime.date.today()
 
 
 def _read_password_from_db(user_id, unit_id):
-    try:
-        pass_dict = database[str(user_id)][str(unit_id)]
-        if datetime.date.today() - pass_dict["date"] \
-                < datetime.timedelta(days=3) and False:
-            return pass_dict
-    except (KeyError, TypeError):
-        pass
     return None
 
 
             print(row)
         return
 
-    if args.action == "clear_cache":
-        database.clear()
-        database.close()
-        return
-
     super_password = None
 
     if args.action == 'check':
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.