Skip to content

Commit

Permalink
Bug 1799042 - part 2: Rename _extract_application_ini_data() into ...…
Browse files Browse the repository at this point in the history
…_from_directory() r=gabriel

Depends on D162225

Differential Revision: https://phabricator.services.mozilla.com/D171119
  • Loading branch information
JohanLorenzo committed Mar 7, 2023
1 parent 26e6267 commit d4f9ecb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions python/mozbuild/mozbuild/repackaging/deb.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def repackage_deb(infile, output, template_dir, arch, version, build_number):
source_dir = os.path.join(tmpdir, "source")
try:
mozfile.extract_tarball(infile, source_dir)
application_ini_data = _extract_application_ini_data(source_dir)
application_ini_data = _extract_application_ini_data_from_directory(source_dir)
build_variables = _get_build_variables(
application_ini_data,
arch,
Expand Down Expand Up @@ -87,9 +87,9 @@ def repackage_deb(infile, output, template_dir, arch, version, build_number):
shutil.rmtree(tmpdir)


def _extract_application_ini_data(application_director):
def _extract_application_ini_data_from_directory(application_directory):
values = get_application_ini_values(
application_director,
application_directory,
dict(section="App", value="Name"),
dict(section="App", value="CodeName", fallback="Name"),
dict(section="App", value="Vendor"),
Expand Down
4 changes: 2 additions & 2 deletions python/mozbuild/mozbuild/test/repackaging/test_deb.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from mozbuild.repackaging import deb


def test_extract_application_ini_data():
def test_extract_application_ini_data_from_directory():
with tempfile.TemporaryDirectory() as d:
with open(os.path.join(d, "application.ini"), "w") as f:
f.write(
Expand All @@ -29,7 +29,7 @@ def test_extract_application_ini_data():
"""
)

assert deb._extract_application_ini_data(d) == {
assert deb._extract_application_ini_data_from_directory(d) == {
"name": "Firefox",
"display_name": "Firefox Nightly",
"vendor": "Mozilla",
Expand Down

0 comments on commit d4f9ecb

Please sign in to comment.