diff options
Diffstat (limited to 'discard_patches.py')
-rwxr-xr-x | discard_patches.py | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/discard_patches.py b/discard_patches.py index 4dd99ead..a6383f6b 100755 --- a/discard_patches.py +++ b/discard_patches.py @@ -13,53 +13,53 @@ import subprocess def discard_git(path): - try: - subprocess.check_call(['git', '-C', path, 'reset']) - subprocess.check_call(['git', '-C', path, 'clean', '-fdx']) - subprocess.check_call(['git', '-C', path, 'stash']) - print('Patch in %s removed successfully!' % path) - except subprocess.CalledProcessError: - print('Error while removing patch in %s' % path) + try: + subprocess.check_call(['git', '-C', path, 'reset']) + subprocess.check_call(['git', '-C', path, 'clean', '-fdx']) + subprocess.check_call(['git', '-C', path, 'stash']) + print('Patch in %s removed successfully!' % path) + except subprocess.CalledProcessError: + print('Error while removing patch in %s' % path) def dispatch_skia(): - skia_dir = os.path.join(config.android_home, config.bench_dict['Skia']) - discard_git(skia_dir) + skia_dir = os.path.join(config.android_home, config.bench_dict['Skia']) + discard_git(skia_dir) def dispatch_autotest(): - autotest_dir = os.path.join(config.android_home, config.autotest_dir) - discard_git(autotest_dir) + autotest_dir = os.path.join(config.android_home, config.autotest_dir) + discard_git(autotest_dir) def dispatch_panorama(): - panorama_dir = os.path.join(config.android_home, - config.bench_dict['Panorama']) - discard_git(panorama_dir) - try: - subprocess.check_call(['rm', '-rf', panorama_dir]) - print('Panorama benchmark directory deleted successfully!') - except subprocess.CalledProcessError: - print('Error deleting Panorama benchmark directory') + panorama_dir = os.path.join(config.android_home, + config.bench_dict['Panorama']) + discard_git(panorama_dir) + try: + subprocess.check_call(['rm', '-rf', panorama_dir]) + print('Panorama benchmark directory deleted successfully!') + except subprocess.CalledProcessError: + print('Error deleting Panorama benchmark directory') def dispatch_synthmark(): - synthmark_dir = 'synthmark' - try: - subprocess.check_call( - ['rm', '-rf', - os.path.join(config.android_home, synthmark_dir)]) - print('Synthmark patch removed successfully!') - except subprocess.CalledProcessError: - print('Synthmark is not removed. Error occurred.') + synthmark_dir = 'synthmark' + try: + subprocess.check_call( + ['rm', '-rf', + os.path.join(config.android_home, synthmark_dir)]) + print('Synthmark patch removed successfully!') + except subprocess.CalledProcessError: + print('Synthmark is not removed. Error occurred.') def main(): - dispatch_skia() - dispatch_autotest() - dispatch_panorama() - dispatch_synthmark() + dispatch_skia() + dispatch_autotest() + dispatch_panorama() + dispatch_synthmark() if __name__ == '__main__': - main() + main() |