Opened 2 years ago

Closed 2 years ago

Last modified 4 weeks ago

#5729 closed defect (fixed)

remove_redundant_translations fails due to the presence of system file

Reported by: diegocarloslima Assignee: jwangenheim
Priority: P2 Milestone: Adblock-Browser-for-Android-1.3.0
Module: Adblock-Browser-for-Android Keywords:
Cc: jwangenheim Blocked By:
Blocking: Platform: Adblock Browser for Android
Ready: yes Confidential: no
Tester: Unknown Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29549604/

Description

How to reproduce

  1. On a mac, access through Finder adblockbrowser/mobile/android/base/locales/adblockbrowser/. It will produce a .DS_Store file on that folder.
  2. Run python translations.py get API_KEY

Observed behaviour

The script fails with the following error:

Traceback (most recent call last):
  File "translations.py", line 98, in <module>
    remove_redundant_translations()
  File "translations.py", line 84, in remove_redundant_translations
    if not filecmp.dircmp(locale_path, default_locale_path).diff_files:
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/filecmp.py", line 238, in __getattr__
    self.methodmap[attr](self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/filecmp.py", line 174, in phase3
    xx = cmpfiles(self.left, self.right, self.common_files)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/filecmp.py", line 238, in __getattr__
    self.methodmap[attr](self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/filecmp.py", line 143, in phase2
    for x in self.common:
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/filecmp.py", line 238, in __getattr__
    self.methodmap[attr](self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/filecmp.py", line 132, in phase1
    a = dict(izip(imap(os.path.normcase, self.left_list), self.left_list))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/filecmp.py", line 238, in __getattr__
    self.methodmap[attr](self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/filecmp.py", line 124, in phase0
    self.left_list = _filter(os.listdir(self.left),
OSError: [Errno 20] Not a directory: '/Users/dlima/Workspace/adblockbrowser/mobile/android/base/locales/adblockbrowser/.DS_Store'

Expected behaviour

The script should complete successfully. Files (and ideally hidden directories) should be ignored in remove_redundant_translationsfunction

Change History (6)

comment:1 Changed 2 years ago by jwangenheim

  • Owner set to jwangenheim

comment:2 Changed 2 years ago by jwangenheim

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:4 Changed 2 years ago by jwangenheim

  • Milestone set to Adblock-Browser-for-Android-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:5 Changed 23 months ago by traynard

  • Verified working set

Confirmed with Diego that this is a build issue

comment:6 Changed 4 weeks ago by sunnyydv12

You can easy to play any where https://getrobloxfreerobux.com now let's play and create the best score.

Note: See TracTickets for help on using tickets.