Corrections.
darcs-hash:20080209020948-af139-3a259bbab9d382b1c72a5d3087e47641b1f87417.gz
This commit is contained in:
parent
aa9724e031
commit
5d6f9722bb
2 changed files with 8 additions and 8 deletions
|
@ -26,16 +26,16 @@ sys.path.append('/usr/scripts/gestion')
|
||||||
|
|
||||||
def comment(line):
|
def comment(line):
|
||||||
'''Écrit un commentaire'''
|
'''Écrit un commentaire'''
|
||||||
out(comment_start + " " + line + "\n")
|
out("# " + line + "\n")
|
||||||
|
|
||||||
emacs_mode = "conf-unix"
|
emacs_mode = "conf-unix"
|
||||||
|
|
||||||
def header(desc=None, mode=None):
|
def header(desc=None, mode=None):
|
||||||
'''Écrit une en-tête de fichier avec un commentaire'''
|
'''Écrit une en-tête de fichier avec un commentaire'''
|
||||||
comment("-*- mode: %s; coding: utf-8 -*-" % (mode or emacs_mode))
|
comment("-*- mode: %s; coding: utf-8 -*-" % (mode or emacs_mode))
|
||||||
comment("")
|
@#
|
||||||
comment("Fichier gere par BCfg2 (avec le plugin Python)")
|
@# Fichier gere par BCfg2
|
||||||
comment("")
|
@#
|
||||||
if desc:
|
if desc:
|
||||||
lines = desc.split('\n')
|
lines = desc.split('\n')
|
||||||
if lines[-1] == "":
|
if lines[-1] == "":
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
def pubipof(hostname):
|
def pubipof(hostname):
|
||||||
socket.gethostbyname(hostname + ".crans.org")
|
return socket.gethostbyname(hostname + ".crans.org")
|
||||||
|
|
||||||
def admipof(hostname):
|
def admipof(hostname):
|
||||||
socket.gethostbyname(hostname + ".adm.crans.org")
|
return socket.gethostbyname(hostname + ".adm.crans.org")
|
||||||
|
|
||||||
def pubip():
|
def pubip():
|
||||||
pubip(pubhostname)
|
return pubip(pubhostname)
|
||||||
|
|
||||||
def admip():
|
def admip():
|
||||||
admip(admhostname)
|
return admip(admhostname)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue