mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-11 05:34:17 +00:00
fix pep8
This commit is contained in:
@@ -151,10 +151,11 @@ class Updater:
|
|||||||
def _same_rights(self, left, right):
|
def _same_rights(self, left, right):
|
||||||
"""return True if files have the same modes"""
|
"""return True if files have the same modes"""
|
||||||
try:
|
try:
|
||||||
l = os.stat(left)
|
lefts = os.stat(left)
|
||||||
r = os.stat(right)
|
rights = os.stat(right)
|
||||||
return l.st_mode == r.st_mode
|
return lefts.st_mode == rights.st_mode
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
|
self.log.err(e)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _mirror_rights(self, src, dst):
|
def _mirror_rights(self, src, dst):
|
||||||
@@ -316,10 +317,10 @@ class Updater:
|
|||||||
|
|
||||||
# compare rights
|
# compare rights
|
||||||
for common in diff.common_files:
|
for common in diff.common_files:
|
||||||
l = os.path.join(left, common)
|
leftf = os.path.join(left, common)
|
||||||
r = os.path.join(right, common)
|
rightf = os.path.join(right, common)
|
||||||
if not self._same_rights(l, r):
|
if not self._same_rights(leftf, rightf):
|
||||||
self._mirror_rights(l, r)
|
self._mirror_rights(leftf, rightf)
|
||||||
|
|
||||||
# Recursively decent into common subdirectories.
|
# Recursively decent into common subdirectories.
|
||||||
for subdir in diff.subdirs.values():
|
for subdir in diff.subdirs.values():
|
||||||
|
|||||||
Reference in New Issue
Block a user