import getopt
from plc_config import PLCConfiguration
+from plc_config import ConfigurationException
####################
-release_id = "$Id: plc-config-tty 635 2007-07-05 11:08:14Z thierry $"
-release_rev = "$Revision: 635 $"
+release_id = "$Id$"
+release_rev = "$Revision$"
def init_flavour (flavour):
global service
return
elif (command in "wW"):
try:
+ # Confirm that various constraints are met before saving file.
+ cwrite.verify(cdef, cread)
cwrite.save(site_config)
+ except ConfigurationException, e:
+ print "Save failed due to a configuration exception: %s" % e
+ break;
except:
+ import traceback; print traceback.print_exc()
print ("Could not save -- fix write access on %s" % site_config)
break
print ("Wrote %s" % site_config)