Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

24.04 migration #1084

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ros_buildfarm/scripts/generate_all_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

import argparse
import imp
from importlib.machinery import SourceFileLoader
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added in Python 3.3, so all supported versions should work 👍

import os
import sys

Expand Down Expand Up @@ -355,7 +355,7 @@ def _check_call(cmd):
print('')
basepath = os.path.dirname(__file__)
cmd[0] = os.path.join(basepath, cmd[0])
module = imp.load_source('script', cmd[0])
module = SourceFileLoader('script', cmd[0]).load_module()
rc = module.main(cmd[1:])
if rc:
sys.exit(rc)
Expand Down
6 changes: 4 additions & 2 deletions ros_buildfarm/templates/snippet/reconfigure_jobs.groovy.em
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import difflib.DiffUtils
import com.github.difflib.DiffUtils
import com.github.difflib.UnifiedDiffUtils
import groovy.io.FileType
@@ThreadInterrupt
import groovy.transform.ThreadInterrupt
Expand Down Expand Up @@ -41,6 +42,7 @@ println '# BEGIN SECTION: Groovy script - reconfigure'
dry_run = @('true' if dry_run else 'false')
dry_run_suffix = dry_run ? ' (dry run)' : ''

println "User: " + System.getProperty("user.name")

@[if vars().get('expected_num_views')]@
// reconfigure views
Expand Down Expand Up @@ -272,7 +274,7 @@ def diff_configs(current_config, new_config) {
}

patch = DiffUtils.diff(current_lines, new_lines)
return DiffUtils.generateUnifiedDiff('current config', 'new config', current_lines, patch, 0)
return UnifiedDiffUtils.generateUnifiedDiff('current config', 'new config', current_lines, patch, 0)
}


Expand Down
Loading