tags 276937 + pending patch
retitle 276937 --submit should honour $EMAIL
thanks
* James R. Van Zandt <[EMAIL PROTECTED]> [2005-06-16 21:24]:
> I suppose one could identify two cases:
> - If the default address came from a jack configuration file or a
> jack-specific environment variable like JACK_EMAIL then no prompt
> should be needed.
> - If the default address came from a generic environment variable
> EMAIL or even [EMAIL PROTECTED] /etc/mailname` then there is a greater chance
> the default is wrong, so a prompt is called for.
>
> However, I don't think the first point is a strong one. I.e.:
>
> > You don't mind being prompted for the email address as long as the
> > default is correct.
Actually, most of what you want is implemente by jack already. You
can specify your address via
--my-mail string
your e-mail address, needed for freedb submissions.
i.e. something like
jack --submit --my-mail [EMAIL PROTECTED]
will work.
Also, you can put the following in your ~/.jack3rc
my_mail:[EMAIL PROTECTED]
Then, jack will take $USER@/hostname if --my-mail is not used. I've
now also implemented support for $EMAIL. Here's a patch.
diff -urN jack-3.1.1~/jack_checkopts.py jack-3.1.1/jack_checkopts.py
--- jack-3.1.1~/jack_checkopts.py 2005-06-19 22:24:29.920085360 +0100
+++ jack-3.1.1/jack_checkopts.py 2005-06-19 22:25:13.014534008 +0100
@@ -105,7 +105,11 @@
tmp_mail =
jack_freedb.freedb_servers[cf['freedb_server']['val']]['my_mail']
tmp_mail2 = cf['_my_mail']
if len(cf['_my_mail']) <= 3 or cf['_my_mail'] == "default" or
cf['_my_mail'].find("@") < 1:
- jack_freedb.freedb_servers[cf['freedb_server']['val']]['my_mail']
= cf['username']['val'] + "@" + cf['hostname']['val']
+ env = os.getenv("EMAIL")
+ if env:
+
jack_freedb.freedb_servers[cf['freedb_server']['val']]['my_mail'] = env
+ else:
+
jack_freedb.freedb_servers[cf['freedb_server']['val']]['my_mail'] =
cf['username']['val'] + "@" + cf['hostname']['val']
if len(cf['my_mail']['history']) > 1:
warning("illegal mail address changed to " +
jack_freedb.freedb_servers[cf['freedb_server']['val']]['my_mail'])
else:
--
Martin Michlmayr
http://www.cyrius.com/
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]