Closed
Bug 1182301
Opened 9 years ago
Closed 9 years ago
Better/more configurable notifications from mach
Categories
(Firefox Build System :: General, enhancement)
Firefox Build System
General
Tracking
(firefox42 fixed)
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: u408661, Assigned: u408661)
Details
Attachments
(1 file)
1.26 KB,
patch
|
gps
:
review+
|
Details | Diff | Splinter Review |
I have often found myself wishing that (1) I could make mach notify me earlier than the default 5 minutes, and (2) mach's notification would tell me if the build failed (rather than just "completed"). So, I whipped up a patch to make it do those things.
Attachment #8631828 -
Flags: review?(gps)
Comment 1•9 years ago
|
||
Comment on attachment 8631828 [details] [diff] [review] better-mach-notifications.patch Review of attachment 8631828 [details] [diff] [review]: ----------------------------------------------------------------- ::: python/mozbuild/mozbuild/mach_commands.py @@ +424,5 @@ > > + notify_minimum_time = 300 > + try: > + notify_minimum_time = int(os.getenv('MACH_NOTIFY_MINTIME')) > + except (TypeError, ValueError): Why TypeError? Also, os.environ is preferred over os.getenv(). e.g. os.environ.get('MACH_NOTIFY_MINTIME', '300')
Attachment #8631828 -
Flags: review?(gps) → review+
(In reply to Gregory Szorc [:gps] from comment #1) > Comment on attachment 8631828 [details] [diff] [review] > better-mach-notifications.patch > > Review of attachment 8631828 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: python/mozbuild/mozbuild/mach_commands.py > @@ +424,5 @@ > > > > + notify_minimum_time = 300 > > + try: > > + notify_minimum_time = int(os.getenv('MACH_NOTIFY_MINTIME')) > > + except (TypeError, ValueError): > > Why TypeError? Without a default (as in the patch), os.getenv returns None, which causes int() to raise a TypeError instead of a ValueError. > Also, os.environ is preferred over os.getenv(). e.g. > os.environ.get('MACH_NOTIFY_MINTIME', '300') This makes the TypeError check useless, though :)
Comment 3•9 years ago
|
||
notify_minimum_time = 300 try: notify_minimum_time = int(os.environ.get('MACH_NOTIFY_MINTIME', '300')) except ValueError: pass
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d10aa8e7b3d7
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•