summaryrefslogtreecommitdiffstats
path: root/cobbler/action_litesync.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-05-29 18:48:39 -0400
committerMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-05-29 18:48:39 -0400
commitf0d5545df35f9974fb8c4ae572cfea831e79a358 (patch)
tree7876991786aac9479faa894c4d0f7dcb2a9cdcea /cobbler/action_litesync.py
parent201e727a1fc571f3a56763dc044a58504cc89af6 (diff)
downloadthird_party-cobbler-f0d5545df35f9974fb8c4ae572cfea831e79a358.tar.gz
third_party-cobbler-f0d5545df35f9974fb8c4ae572cfea831e79a358.tar.xz
third_party-cobbler-f0d5545df35f9974fb8c4ae572cfea831e79a358.zip
Begining of i18n of cobbler. Tests pass, works with English. Need to test
translation function and run manual testing to ensure no functional errors in other places (such as import). cobbler_msg (strings file) has been removed.
Diffstat (limited to 'cobbler/action_litesync.py')
-rw-r--r--cobbler/action_litesync.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/cobbler/action_litesync.py b/cobbler/action_litesync.py
index 51369ee..e3d63e6 100644
--- a/cobbler/action_litesync.py
+++ b/cobbler/action_litesync.py
@@ -24,11 +24,9 @@ import yaml # Howell-Clark version
import sub_process
import sys
-import cexceptions
import utils
import action_sync
-import cobbler_msg
-import cexceptions
+from cexceptions import *
import traceback
import errno
@@ -57,7 +55,7 @@ class BootLiteSync:
# get the distro record
distro = self.distros.find(name)
if distro is None:
- raise cexceptions.CobblerException("error in distro lookup: %s" % name)
+ raise CX(_("error in distro lookup: %s") % name)
# generate YAML file in distros/$name in webdir
self.sync.write_distro_file(distro)
# copy image files to images/$name in webdir & tftpboot:
@@ -77,7 +75,7 @@ class BootLiteSync:
# get the profile object:
profile = self.profiles.find(name)
if profile is None:
- raise cexceptions.CobblerException("error in profile lookup")
+ raise CX(_("error in profile lookup"))
# rebuild profile_list YAML file in webdir
self.sync.write_listings()
# add profiles/$name YAML file in webdir
@@ -97,7 +95,7 @@ class BootLiteSync:
# get the system object:
system = self.systems.find(name)
if system is None:
- raise cexceptions.CobblerException("error in system lookup")
+ raise CX(_("error in system lookup"))
# rebuild system_list file in webdir
self.sync.regen_ethers() # /etc/ethers, for dnsmasq & rarpd
self.sync.regen_hosts() # /var/lib/cobbler/cobbler_hosts, pretty much for dnsmasq