diff --git a/pyfpdb/Configuration.py b/pyfpdb/Configuration.py index ec4c621e..c3c93293 100755 --- a/pyfpdb/Configuration.py +++ b/pyfpdb/Configuration.py @@ -166,6 +166,10 @@ if LOCALE_ENCODING == "US-ASCII": # needs LOCALE_ENCODING (above), imported for sqlite setup in Config class below + +FROZEN = hasattr(sys, "frozen") +EXEC_PATH = get_exec_path() + import Charset @@ -613,7 +617,11 @@ class Config: def save(self, file = None): if file is None: file = self.file - shutil.move(file, file+".backup") + try: + shutil.move(file, file+".backup") + except: + pass + with open(file, 'w') as f: self.doc.writexml(f) @@ -1030,3 +1038,9 @@ if __name__== "__main__": PrettyPrint(site_node, stream=sys.stdout, encoding="utf-8") except: print "xml.dom.ext needs PyXML to be installed!" + + print "FROZEN =", FROZEN + print "EXEC_PATH =", EXEC_PATH + + print "press enter to end" + sys.stdin.readline()