From 79ef0b8c055e8d00e7669643f6d64ea54aa48d75 Mon Sep 17 00:00:00 2001 From: Vincent A Date: Sun, 6 Sep 2020 15:47:40 +0200 Subject: [PATCH] tools/stable_backport: don't search original file for manual port data --- tools/stable_backport.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/stable_backport.py b/tools/stable_backport.py index 002875f758..dfb863c60f 100755 --- a/tools/stable_backport.py +++ b/tools/stable_backport.py @@ -70,15 +70,15 @@ def reimport_module(self, module): target = path.join(self.compat_dir, '%s.py' % new_module) base_module = '.'.join(module.split('.')[:-1]) - try: - r = check_output('git show %s:%s' % (DEVEL_BRANCH, filename), shell=True, stderr=STDOUT).decode('utf-8') - except CalledProcessError: - # this file does not exist, perhaps a directory. - return - if module in MANUAL_PORTS: shutil.copyfile(path.join(MANUAL_PORT_DIR, path.basename(target)), target) else: + try: + r = check_output('git show %s:%s' % (DEVEL_BRANCH, filename), shell=True, stderr=STDOUT).decode('utf-8') + except CalledProcessError: + # this file does not exist, perhaps a directory. + return + # Copy module from devel to a compat/ sub-module with open(target, 'w') as fp: for line in r.split('\n'): -- GitLab