summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Core.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-10-30 13:46:12 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-10-30 13:46:12 -0400
commitae0aa49bda81d33b657e3a1d26e6b77fb3a8ac18 (patch)
treee33fff8e9d706348322684056a8f67a089c84ad3 /src/lib/Bcfg2/Server/Core.py
parenta8de10cde0b83743e8e453c8318cd1ab15e7c419 (diff)
downloadbcfg2-ae0aa49bda81d33b657e3a1d26e6b77fb3a8ac18.tar.gz
bcfg2-ae0aa49bda81d33b657e3a1d26e6b77fb3a8ac18.tar.bz2
bcfg2-ae0aa49bda81d33b657e3a1d26e6b77fb3a8ac18.zip
fixed Core stringification
Diffstat (limited to 'src/lib/Bcfg2/Server/Core.py')
-rw-r--r--src/lib/Bcfg2/Server/Core.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/Bcfg2/Server/Core.py b/src/lib/Bcfg2/Server/Core.py
index 9174878b2..8ea81b934 100644
--- a/src/lib/Bcfg2/Server/Core.py
+++ b/src/lib/Bcfg2/Server/Core.py
@@ -1364,8 +1364,11 @@ class NetworkCore(Core):
"\n.. automethod:: _daemonize\n"
def __str__(self):
- return "%s(%s)" % (self.__class__.__name__,
- Bcfg2.Options.setup.location)
+ if hasattr(Bcfg2.Options.setup, "location"):
+ return "%s(%s)" % (self.__class__.__name__,
+ Bcfg2.Options.setup.location)
+ else:
+ return Core.__str__(self)
def run(self):
""" Run the server core. This calls :func:`_daemonize` before