Explorar o código

- improve documentation

oz123 %!s(int64=12) %!d(string=hai) anos
pai
achega
c6714420a6
Modificáronse 3 ficheiros con 10 adicións e 3 borrados
  1. 5 1
      pwman/data/drivers/sqlite.py
  2. 5 1
      pwman/util/config.py
  3. 0 1
      scripts/pwman3

+ 5 - 1
pwman/data/drivers/sqlite.py

@@ -35,6 +35,7 @@ else:
         raise DatabaseException("python-sqlite2 not installed")
 
 import pwman.util.config as config
+
 import cPickle
 
 class SQLiteDatabase(Database):
@@ -102,7 +103,6 @@ class SQLiteDatabase(Database):
                 m = re.search('S\"S\'(.+?)\'', tagstring)
                 if m:
                     found = m.group(1)
-                    #tag = cPickle.loads(str(row[0]))
                     tags.append(Tag(found))
                 row = self._cur.fetchone()
             return tags
@@ -285,6 +285,10 @@ class SQLiteDatabase(Database):
                 raise e
 
     def savekey(self, key):
+        """
+        This function is saving the key to table KEY. 
+        The key already arrives as an encrypted string.
+        """
         sql = "UPDATE KEY SET THEKEY = ?"
         values = [key]
         self._cur.execute(sql, values)

+ 5 - 1
pwman/util/config.py

@@ -72,7 +72,11 @@ def set_value(section, name, value):
     _conf[section][name] = value
 
 def get_conf():
-    """Get a copy of the config. Modifications have no effect. This function only serves for allowing applications to output the config to the user"""
+    """
+    Get a copy of the config. 
+    Modifications have no effect. 
+    This function only serves for allowing applications 
+    to output the config to the user"""
     global _conf
     return copy.deepcopy(_conf)
 

+ 0 - 1
scripts/pwman3

@@ -112,7 +112,6 @@ try:
     if args.algo != "Blowfish":
             config.set_value("Encryption", "algorithm", args.algo)
             _saveconfig = False
-    print config.get_value('Database', "filename")
     # set umask before creating/opening any files
     umask = int(config.get_value("Global", "umask"))
     os.umask(umask)