Closed Bug 769383 Opened 12 years ago Closed 12 years ago

[mozinstall] is_installer() should not assert if src is a file but return a boolean value

Categories

(Testing :: Mozbase, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: whimboo, Assigned: whimboo)

Details

Attachments

(1 file)

Right now we assert that the src is a file. This is kinda bad because this function is intended to return a boolean value and not to throw an exception.

assert os.path.isfile(src), 'Installer has to be a file'

Instead we should return false if src is not a file.
Attached file Patch
Pointer to Github pull-request
Attachment #637614 - Attachment description: Pointer to Github pull request: https://github.com/mozilla/mozbase/pull/23 → Patch
Attachment #637614 - Flags: review?(jhammel)
Comment on attachment 637614 [details]
Patch

sounds good to me
Attachment #637614 - Flags: review?(jhammel) → review+
https://github.com/mozilla/mozbase/commit/4f024605b1630003c804096c53a930a761510cd6

I will also bump the version of mozinstall and release on pypi so we can make use of it in our mozmill-automation package.
Version bump to 1.1:
https://github.com/mozilla/mozbase/commit/588c89e8a3f259413d08f58747a17a0c7b22ae2d

Created tag:
https://github.com/mozilla/mozbase/tree/mozinstall-1.1

Release 1.1 on PyPI:
http://pypi.python.org/pypi/mozInstall/1.1
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: