Permalink
Browse files

* Added translations for CNAME

* Added some TODO reminders for cases in which the SMTP fails
  • Loading branch information...
1 parent 28a0eb8 commit 524410f0905f3121803c2ffbf81fcd73120e4815 nemesisdesign committed Nov 21, 2011
Showing with 18 additions and 2 deletions.
  1. BIN locale/it/LC_MESSAGES/django.mo
  2. +6 −0 locale/it/LC_MESSAGES/django.po
  3. +12 −2 nodeshot/utils.py
Binary file not shown.
@@ -966,3 +966,9 @@ msgstr "Disegna link da/a questa interfaccia (escluse interfacce VPN)"
msgid "Hide from map"
msgstr "Nascondi dalla mappa"
+
+msgid "Name used for DNS resolution. Example: eth0 becomes eth0.devicecname.nodename.domain.org. If left empty the interface type is used as default."
+msgstr "Nome usato per la risoluzione DNS. Esempio: eth0 diventa eth0.nomeapparato.nomenodo.dominio.org. Se lasciato vuoto viene utilizzato il tipo interfaccia come default."
+
+msgid "Name used for DNS resolution. Example: grid1 becomes grid1.nodename.domain.org. If left empty device name is used as default."
+msgstr "Nome usato per la risoluzione DNS. Esempio: grid1 diventa grid1.nomenodo.dominio.org. Se lasciato vuoto viene utilizzato il nome dell'apparato come valore di default."
View
@@ -43,6 +43,7 @@ def email_owners(node, subject, body_template, context, reply_to=False):
if node.email3 != '' and node.email3 != None:
recipient_list += [node.email3]
+ #try:
# send mail
if reply_to:
from django.core.mail import EmailMessage
@@ -51,6 +52,10 @@ def email_owners(node, subject, body_template, context, reply_to=False):
else:
from django.core.mail import send_mail
send_mail(subject, message, DEFAULT_FROM_EMAIL, recipient_list)
+ #except:
+ # smtp is offline
+ # TODO: return a nice message to the user
+ #pass
def notify_admins(node, subject, body_template, context, skip=False):
"""
@@ -75,8 +80,13 @@ def notify_admins(node, subject, body_template, context, skip=False):
context['admin'] = admin
# parse message
message = render_to_string(body_template,context)
- # send email
- admin.email_user(subject, message)
+ try:
+ # send email
+ admin.email_user(subject, message)
+ except:
+ # smtp is offline
+ # TODO: maybe this case should be logged?
+ pass
def jslugify(slug):
"""

0 comments on commit 524410f

Please sign in to comment.