Sfoglia il codice sorgente

Store username in archive

Jonas Borgström 14 anni fa
parent
commit
6c672b1ee5
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      dedupestore/archive.py

+ 2 - 0
dedupestore/archive.py

@@ -1,4 +1,5 @@
 from datetime import datetime
+from getpass import getuser
 import logging
 import msgpack
 import os
@@ -56,6 +57,7 @@ class Archive(object):
             'cindex': cindex_hash,
             'cmdline': sys.argv,
             'hostname': socket.gethostname(),
+            'username': getuser(),
             'ts': datetime.utcnow().isoformat(),
             'items': self.items,
         }