Skip to content

Commit 6f3be3d

Browse files
committed
Suggested modification to fix win32 logging failure, due to local variable scope.
Logger does not appear to have any utility within "logging_subprocess".
1 parent d7ba570 commit 6f3be3d

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

github_backup/github_backup.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242

4343
def logging_subprocess(
4444
popenargs,
45-
logger,
4645
stdout_log_level=logging.DEBUG,
4746
stderr_log_level=logging.ERROR,
4847
**kwargs
@@ -1278,20 +1277,20 @@ def fetch_repository(
12781277

12791278
if "origin" not in remotes:
12801279
git_command = ["git", "remote", "rm", "origin"]
1281-
logging_subprocess(git_command, None, cwd=local_dir)
1280+
logging_subprocess(git_command, cwd=local_dir)
12821281
git_command = ["git", "remote", "add", "origin", remote_url]
1283-
logging_subprocess(git_command, None, cwd=local_dir)
1282+
logging_subprocess(git_command, cwd=local_dir)
12841283
else:
12851284
git_command = ["git", "remote", "set-url", "origin", remote_url]
1286-
logging_subprocess(git_command, None, cwd=local_dir)
1285+
logging_subprocess(git_command, cwd=local_dir)
12871286

12881287
if lfs_clone:
12891288
git_command = ["git", "lfs", "fetch", "--all", "--prune"]
12901289
else:
12911290
git_command = ["git", "fetch", "--all", "--force", "--tags", "--prune"]
12921291
if no_prune:
12931292
git_command.pop()
1294-
logging_subprocess(git_command, None, cwd=local_dir)
1293+
logging_subprocess(git_command, cwd=local_dir)
12951294
else:
12961295
logger.info(
12971296
"Cloning {0} repository from {1} to {2}".format(
@@ -1300,18 +1299,18 @@ def fetch_repository(
13001299
)
13011300
if bare_clone:
13021301
git_command = ["git", "clone", "--mirror", remote_url, local_dir]
1303-
logging_subprocess(git_command, None)
1302+
logging_subprocess(git_command)
13041303
if lfs_clone:
13051304
git_command = ["git", "lfs", "fetch", "--all", "--prune"]
13061305
if no_prune:
13071306
git_command.pop()
1308-
logging_subprocess(git_command, None, cwd=local_dir)
1307+
logging_subprocess(git_command, cwd=local_dir)
13091308
else:
13101309
if lfs_clone:
13111310
git_command = ["git", "lfs", "clone", remote_url, local_dir]
13121311
else:
13131312
git_command = ["git", "clone", remote_url, local_dir]
1314-
logging_subprocess(git_command, None)
1313+
logging_subprocess(git_command)
13151314

13161315

13171316
def backup_account(args, output_directory):

0 commit comments

Comments
 (0)