All users were logged out of Bugzilla on October 13th, 2018

[LSV] Fix path to all-locales for mobile in compare.py

RESOLVED FIXED

Status

RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Milos, Assigned: Milos)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
Created attachment 622340 [details] [diff] [review]
Fix for mobile all-locales path

Ever since all-locales file changed location in mobile, diff script is failing to do any diffs with error:

Traceback (most recent call last):
  File "compare.py", line 90, in <module>
    locales = map(lambda s:s.strip(),open(localesfile_path).readlines())
IOError: [Errno 2] No such file or directory: '../mozilla-central/mobile/locales/all-locales'
Traceback (most recent call last):
  File "compare.py", line 90, in <module>
    locales = map(lambda s:s.strip(),open(localesfile_path).readlines())
IOError: [Errno 2] No such file or directory: '../releases/mozilla-aurora/mobile/locales/all-locales'
Traceback (most recent call last):
  File "compare.py", line 90, in <module>
    locales = map(lambda s:s.strip(),open(localesfile_path).readlines())
IOError: [Errno 2] No such file or directory: '../releases/mozilla-beta/mobile/locales/all-locales'

Submitting a patch that fixes that.
Attachment #622340 - Flags: review?(stas)
Attachment #622340 - Flags: feedback?(l10n)

Updated

7 years ago
Attachment #622340 - Flags: feedback?(l10n) → feedback+
Comment on attachment 622340 [details] [diff] [review]
Fix for mobile all-locales path

Review of attachment 622340 [details] [diff] [review]:
-----------------------------------------------------------------

I'd probably go for something like the following, in case there are more apps in the future:

  all_locales = {
    'browser': 'locales',
    'mobile': 'android/locales',
  }
  localesfile_path = os.path.join(frm, app, all_locales[app], localesfile)

But your version is fine, r=me.
Attachment #622340 - Flags: review?(stas) → review+
(Assignee)

Comment 2

7 years ago
Thanks guys,

Landed in http://hg.mozilla.org/l10n/l10n-src-verification/rev/6916f4d8dc9a
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.