Lint fixes
parent
6c161095af
commit
ebef0dc565
|
@ -10,12 +10,12 @@
|
||||||
#
|
#
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import git
|
|
||||||
import argparse
|
import argparse
|
||||||
import tempfile
|
import tempfile
|
||||||
import logging
|
import logging
|
||||||
import subprocess
|
import subprocess
|
||||||
import libarchive
|
|
||||||
import pwd
|
import pwd
|
||||||
import grp
|
import grp
|
||||||
import datetime
|
import datetime
|
||||||
|
@ -24,19 +24,24 @@ import sys
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import xattr
|
|
||||||
import posix1e
|
|
||||||
import base64
|
import base64
|
||||||
import blkid
|
|
||||||
import stat
|
import stat
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
import git
|
||||||
|
import libarchive
|
||||||
|
import xattr
|
||||||
|
import posix1e
|
||||||
|
import blkid
|
||||||
|
|
||||||
class OgProgressPrinter(git.RemoteProgress):
|
class OgProgressPrinter(git.RemoteProgress):
|
||||||
def __init__(self, logger):
|
def __init__(self, parentLogger):
|
||||||
self.logger = logger
|
self.logger = parentLogger
|
||||||
|
|
||||||
def update(self, op_code, cur_count, max_count=None, message=""):
|
def update(self, op_code, cur_count, max_count=None, message=""):
|
||||||
self.logger.debug(f"Progress: {op_code} {cur_count}/{max_count}: {message}")
|
self.logger.debug(f"Progress: {op_code} {cur_count}/{max_count}: {message}")
|
||||||
|
@ -144,11 +149,6 @@ class NTFSLibrary:
|
||||||
else:
|
else:
|
||||||
raise ValueError("Unknown NTFS implementation: {self.implementation}")
|
raise ValueError("Unknown NTFS implementation: {self.implementation}")
|
||||||
|
|
||||||
|
|
||||||
# We've mounted a new filesystem, update our filesystems list
|
|
||||||
self.mounts = self._parse_mounts()
|
|
||||||
|
|
||||||
|
|
||||||
def _hex_to_bin(self, hex_str):
|
def _hex_to_bin(self, hex_str):
|
||||||
|
|
||||||
while len(hex_str) != 16:
|
while len(hex_str) != 16:
|
||||||
|
@ -1028,7 +1028,7 @@ class OpengnsysGitLibrary:
|
||||||
if os.path.isfile(full_path) and file in self.rename_list and root != path:
|
if os.path.isfile(full_path) and file in self.rename_list and root != path:
|
||||||
# Process this last so that all the metadata references the real names.
|
# Process this last so that all the metadata references the real names.
|
||||||
|
|
||||||
logger.debug(f"Found file to rename: {full_path}")
|
self.logger.debug(f"Found file to rename: {full_path}")
|
||||||
renamed_file_path = full_path + "-opengnsys-renamed"
|
renamed_file_path = full_path + "-opengnsys-renamed"
|
||||||
renamed_file_path_rel = full_path_rel + "-opengnsys-renamed"
|
renamed_file_path_rel = full_path_rel + "-opengnsys-renamed"
|
||||||
|
|
||||||
|
@ -1049,7 +1049,7 @@ class OpengnsysGitLibrary:
|
||||||
|
|
||||||
|
|
||||||
if os.path.isdir(full_path) and subdir in self.rename_list and root != path:
|
if os.path.isdir(full_path) and subdir in self.rename_list and root != path:
|
||||||
logger.debug(f"Found directory to rename: {full_path}")
|
self.logger.debug(f"Found directory to rename: {full_path}")
|
||||||
renamed_dir_path = full_path + "-opengnsys-renamed"
|
renamed_dir_path = full_path + "-opengnsys-renamed"
|
||||||
renamed_dir_path_rel = full_path_rel + "-opengnsys-renamed"
|
renamed_dir_path_rel = full_path_rel + "-opengnsys-renamed"
|
||||||
|
|
||||||
|
@ -1305,7 +1305,7 @@ class OpengnsysGitLibrary:
|
||||||
|
|
||||||
self.logger.debug(f"Will mount repo at {path}")
|
self.logger.debug(f"Will mount repo at {path}")
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
os.path.mkdir(path)
|
os.mkdir(path)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue