Closed
Bug 871803
Opened 12 years ago
Closed 12 years ago
typo in mozprofile addons.py
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: k0scist, Unassigned)
References
Details
(Keywords: regression)
Attachments
(1 file)
746 bytes,
patch
|
wlach
:
review+
|
Details | Diff | Splinter Review |
From https://bugzilla.mozilla.org/show_bug.cgi?id=841086#c22
(mozmill)│mozprofile -a
/home/jhammel/mozmill/src/mozbase/mozprofile/tests/addons/empty.xpi
/tmp/tmpgJsvbt.mozrunner
(mozmill)│ls /tmp/tmpgJsvbt.mozrunner
extensions prefs.js user.js
(mozmill)│ls /tmp/tmpgJsvbt.mozrunner/extensions/
staged
(mozmill)│ls /tmp/tmpgJsvbt.mozrunner/extensions/staged/
test-empty@quality.mozilla.org.xpi
(mozmill)│mozprofile -p /tmp/tmpgJsvbt.mozrunner -a
/home/jhammel/mozmill/src/mozbase/mozprofile/tests/addons/empty.xpi
Exception UnboundLocalError: "local variable 'addon' referenced before
assignment" in <bound method AddonManager.clean_addons of
<mozprofile.addons.AddonManager object at 0xa4c72ac>> ignored
Reduced test case:
(mozmill)│mozprofile -a
/home/jhammel/mozmill/src/mozbase/mozprofile/tests/addons/empty.xpi -p
$(mozprofile -a
/home/jhammel/mozmill/src/mozbase/mozprofile/tests/addons/empty.xpi)
Exception UnboundLocalError: "local variable 'addon' referenced before
assignment" in <bound method AddonManager.clean_addons of
<mozprofile.addons.AddonManager object at 0xa6b02cc>> ignored
And this is why we have tests, ladies and gentlemen:
diff --git a/mozprofile/mozprofile/addons.py
b/mozprofile/mozprofile/addons.py
index dcd5df3..8dbdf3c 100644
--- a/mozprofile/mozprofile/addons.py
+++ b/mozprofile/mozprofile/addons.py
@@ -257,7 +257,7 @@ class AddonManager(object):
extensions_path = os.path.join(self.profile,
'extensions', 'staged')
for backup in os.listdir(self.backup_dir):
backup_path = os.path.join(self.backup_dir, backup)
- addon_path = os.path.join(extensions_path, addon)
+ addon_path = os.path.join(extensions_path, backup)
shutil.move(backup_path, addon_path)
if not os.listdir(self.backup_dir):
shutil.rmtree(self.backup_dir, ignore_errors=True)
Reporter | ||
Comment 1•12 years ago
|
||
Attachment #749037 -
Flags: review?(wlachance)
Comment 2•12 years ago
|
||
Comment on attachment 749037 [details] [diff] [review]
fix
lgtm
Attachment #749037 -
Flags: review?(wlachance) → review+
Reporter | ||
Comment 4•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•