Code review done, comment changes only
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 4 Jul 2016 09:49:06 +0000 (11:49 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 4 Jul 2016 10:18:46 +0000 (12:18 +0200)
deltatar/deltatar.py

index b258cf6..5c3d9b5 100644 (file)
@@ -432,12 +432,11 @@ class DeltaTar(object):
         Return if the dicts are equal in the stat keys
         '''
         keys = [u'type', u'mode',u'size', u'mtime',
-            # TODO: check how to restore this correctly if possible
-            # u'inode', u'ctime'
+            # not restored: u'inode', u'ctime'
         ]
 
         # only if user is root, then also check gid/uid. otherwise do not check it,
-        # because tarfile can chown in case of being superuser
+        # because tarfile can chown in case of being superuser only
         if hasattr(os, "geteuid") and os.geteuid() == 0:
             keys.append('gid')
             keys.append('uid')
@@ -638,7 +637,7 @@ class DeltaTar(object):
             statd['offset'] = tarobj.get_last_member_offset()
             self.logger.debug("backup %s" % statd['path'])
 
-            # store in the index the stat dict
+            # store the stat dict in the index
             s = bytes(json.dumps(statd) + '\n', 'UTF-8')
             crc = binascii.crc32(s, crc) & 0xffffffff
             index_fd.write(s)
@@ -804,7 +803,7 @@ class DeltaTar(object):
             if not ipath:
                 action = 'snapshot'
             # if the file is not in the directory iterator, it means that it has
-            # been deleted, so we need to mark it as suck
+            # been deleted, so we need to mark it as such
             elif not dpath:
                 action = 'delete'
             # if the file is in both iterators, it means it might have either