Mailinglist Archive: yast-devel (116 mails)

< Previous Next >
Re: [yast-devel] DnsServerAPI.pm
  • From: Arvin Schnell <aschnell@xxxxxxx>
  • Date: Thu, 12 Jun 2008 21:24:42 +0200
  • Message-id: <20080612192442.GA7929@xxxxxxx>
On Tue, Jun 10, 2008 at 01:21:22PM +0200, Lukas Ocilka wrote:

The current DnsServerAPI module works without yast2-dns-server being
installed. First time it is used, it reports (into log) that the package
is not installed and that the dns-related functions will not work.

I like that approach: Reduce the functionallity if something is
not installed. Of course this must be a understandable omission,
e.g. you cannot open a firewall port in nfs-server configuration
if the firewall module is not installed.

I must admit I looked at the code and didn't understand how the
wrapper works. But wouldn't it be useful if the language
supports this? E.g. in Python the import statement is just a
normal function and can be put in a try block:

try:
import "firewall"
except ImportError:
popup "reduced functionallity..."
log "firewall module missing"
show_open_port_button = False

ciao Arvin

--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >